• 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

Image upload not working through ajax Laravel

Upload a file Using PHP and JavaScript

Yii2: How do I debug console commands?

Woocommerce redirect after add-to-cart error

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

Star and Half Star Rating in Laravel

Calculating Median of an array in PHP

GRPC installed successfully on ubuntu but php is looking for it in another folder

Laravel 5.1 Unknown database type enum requested

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

Laravel Unresolvable dependency resolving [Parameter #0 [ <required> $method ]] in class GuzzleHttpPsr7Request

Laravel after login Two factor not working

Testing subscription renewals on Stripe

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

Woocommerce product attributes with hierarchy like categories

About Contact Privacy policy Terms and conditions