• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to access a var with "-" in PHP [duplicate]

phpphp-5.4


PHP Snippet 1:

$arrayOfObjects[$pos]->{'e-mail'};

PHP Snippet 2:

$arrayOfObjects[$pos]['e-mail'];

Related Snippets

Make survey at laravel 5.4 and MySQL

Utf8 encoding issue with Laravel

Laravel Unknown Column 'updated_at'

Store / Website Column in Magento 2 Admin Grid - Custom Module

How can I create a Download Page with post php method?

PHP array stringify

Laravel PackageManifest.php: Undefined index: name

Why does array_map() with null as callback create an "array of arrays"?

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

CSV to PHP class properties

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

How to send image,audio or video through the WhatsApp API - PHP

Normalize DateInterval in PHP

Using spatie/media-library, how to rename a collection of uploaded files?

PHP's array_map including keys

About Contact Privacy policy Terms and conditions