2

maybe a simple question but i don't get it. How can i access an PHP object when the key begins with a Number?

$myArray->24h_sel

$myArray["24h_sel"] // did not work
Peter
  • 10,619
  • 30
  • 94
  • 147

1 Answers1

5

Use braces and quotes: $myArray->{'24h_sel'};.

Chris
  • 112,704
  • 77
  • 249
  • 231