• 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 install LDAP in Docker php-fpm alpine

How to set a domain name with php artisan serve

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

Laravel Delete and Update

how can I set a session variable in Drupal 8 and get it in a php script?

Laravel You requested 1 items, but there are only 0 items available

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

PHP Warning: Module already loaded in Unknown on line 0

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

How to reset Laravel AuthManager/guards in between API calls in tests?

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

How to fix bootstrap multiselect search data using ajax

How do I enable error reporting in Laravel?

The difference when using if statement true === something() vs something() === true [duplicate]

Printing more than one array using print_r or any other function in php

About Contact Privacy policy Terms and conditions