Reputation: 4050
I got a set of data that looks like this
{ [0]=> object(stdClass)#5 (19) { ["text"]=> string(39) "So true! :(" } object(stdClass)#5 (19) { ["text"]=> string(39) "Some other text"}
I tried this but it's not returning any data
$content->{0}->text;
$content->{1}->text;
how to get this data? it's not returning any
Upvotes: 1
Views: 54
Reputation: 27594
Those are objects inside array, you can access them like this:
$content[0]->text
Upvotes: 3