• 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

PHP Get value from JSON [duplicate]

how to get the header value, if we don't know the value because the value is random from the server

How to create laravel storage symbolic link for production or sub domain system?

VB.NET WebRequest with PHP POST

WHERE IN array binding in DB::raw laravel 5.4

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

php mysql + create a friend request system

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

Attempted to call an undefined method named "get" of class "MailController"

Elastic Beanstalk with Laravel Envoy

No definition found for function in vendor vscode

Creating live search with AJAX and CodeIgniter

file_get_contents() without "Http" to access external URL [closed]

disable two buttons after clicking another button

What is PHP's equivalent of JavaScript's "array.every()"?

About Contact Privacy policy Terms and conditions