• 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

How to change 'users' auth table and use another instead Laravel

PHP Download MP3 files from directory on server

Nginx disallowing execution of PHP in uploads directory with Magento

How to remove index.php and index from the URL using htaccess | PHP

using random function but it's displaying duplicates

How to remove from a multidimensional array all duplicate elements including the original?

Laravel Gates using model and returns "Using $this when not in object context" Line 28 of AzureUser model

Check if string contains a value in array [duplicate]

Laravel Livewire: jQuery not working in child component loaded via @if statement

MySQL upgrade causing unexpected results on simple WHERE clauses

How to properly start Laravel 8 with Bootstrap & authentication

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

Facebook PHP SDK - will not logout properly

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

Detect if PHP session exists

About Contact Privacy policy Terms and conditions