• 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

Performance of foreach, array_map with lambda and array_map with static function

How to Make Laravel Eloquent "IN" Query?

PHP Warning: Module already loaded in Unknown on line 0

PHP Download MP3 files from directory on server

How to auto populate preferredCountries from intl-tel-input with db output

How to prevent phpmailer sending embedded image as an attachment on Gmail?

Show date difference as "20" instead of "20 years ago"

How to create a individual template for page or post in custom plugin?

Unable to Edit config.inc.php

Unable to guess the mime type as no guessers are available Laravel 5.2

Change user role if checkout custom checkbox is checked in WooCommerce

Uncaught TypeError: Cannot read property 'length' of null when retrieving tags from wp

How to install php_imagick on wamp64

How can I make a full text index of the column?

How to execute sql code based on fetch array

About Contact Privacy policy Terms and conditions