How can I echo, for example, the header of the next array?
Trim the first element of the array, and then access the title property ...
echo $entries[0]->title;
I would like to create a variable for each element that I want echo
You can do it manually ...
$title = $entries[0]->title;
Or do it automatically with extract() ...
extract((array) $entries[0], EXTR_SKIP);
Be careful with extract() . It will not overwrite existing variables with the EXTR_SKIP flag, so keep that in mind.
source share