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
  • 11,413
  • 31
  • 100
  • 152

1 Answers1

5

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

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257