0

How to access object property starting with @ ? I have got following object stored in $obj variable.

 Object
(
    [@example] => Array
        (
            [0] => 35815256
            [1] => 38755256 
            [2] => 87678676
        )
    [example] => Array
        (
            [0] => abcdefg
            [1] => abcdef
            [2] => abcde
        )

)

Following print does not work. ERROR: Expected : field name.

print_r($obj -> @example);

This work.

print_r($obj -> example);
Peter Štieber
  • 43
  • 2
  • 10

0 Answers0