• 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

Increase value by 1 on button click

backup files to google drive using PHP

Laravel database insert with combining array and string

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

Convert regular text to array using notepad++

Object of class stdClass could not be converted to string error

PHP error: "The zip extension and unzip command are both missing, skipping."

Detect if PHP session exists

args[max_input] woocommerce if statement confused

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

How to send parameters in soap request in php in __soapcall() function

Laravel post contact form giving me error 419

Can't find vendor/autoload.php for Ratchet

PHP web3 ERC20 token function call

How to keep value of selected value after form submission?

About Contact Privacy policy Terms and conditions