PHP:从数组中获取数据

PHP:从数组中获取数据,php,arrays,Php,Arrays,我得到了一组数据,看起来像这样 { [0]=> object(stdClass)#5 (19) { ["text"]=> string(39) "So true! :(" } object(stdClass)#5 (19) { ["text"]=> string(39) "Some other text"} 我试过了,但没有返回任何数据 $content->{0}->text; $content->{1}->text; 如何获取这些数据?它不会

我得到了一组数据,看起来像这样

 { [0]=> object(stdClass)#5 (19) { ["text"]=> string(39) "So true! :(" } object(stdClass)#5 (19) { ["text"]=> string(39) "Some other text"}
我试过了,但没有返回任何数据

$content->{0}->text;  
$content->{1}->text;

如何获取这些数据?它不会返回任何

这些是数组中的对象,您可以这样访问它们:

$content[0]->text