Hello forums,
How do you access object array items. I have this object stored in a string called data: Example I like to echo ‘Ford’
stdClass Object
(
[1] => stdClass Object
(
[1] => 184
[2] => 193
[3] => 204
[4] => 221
[5] => Ford
[7] => 345
[8] => Fiesta
[10] => 431
[11] => 440
[12] => 443
[13] => 446
)
[2] => stdClass Object
(
[35] => 1396
)
[3] => stdClass Object
(
[37] => 1144
[38] => 1147
[39] => 1150
[40] => 1153
[41] => 1158
[42] => 1160
[44] => 1165
[46] => 1171
)
[4] => stdClass Object
(
[50] => 501
[54] => 512
[57] => 18293ChasisNumber
[63] => 23455ChasisMake
[66] => 567
[67] => 726
[68] => 850
[70] => 864
[74] => 962
[75] => 1037
[79] => 1117
[83] => 1134
)
)
I tried
$data[0]->5 - does not work
$data->0->5 - does not work
$data[0][5] - does not work.
Any advice?
Thanks