1

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

1 Answer 1

3

Those are objects inside array, you can access them like this:

$content[0]->text
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.