The following PHP code I have:
foreach ($resources as $resource)
{
// Iterates on the found IDs
//echo 'Name of field: ' . $resource . ' - Value: ' . $resource->attributes() . '<br />';
echo '<tr><td>'.$resource->attributes().'</td></tr>';
}
Returns:
1
2
3
4
5
6
7
8
I only want to get the value of the last item: 8 I've tried using:
echo end(end($resources->attributes()));
But this returns: 1
Any ideas on how I can get 8 value?
Thanks