straygrey Posted October 2, 2013 Share Posted October 2, 2013 Please tell me how to extract the last data item, namely "3.jpg" from the following object. BTW The last item will not necessarily only ever be the third entry. There could be more or for that matter less. object(stdClass)#5 (1) { ["GetMediaListResult"]=> object(stdClass)#6 (1) { ["string"]=> array(3) { [0]=> string(5) "1.mp4" [1]=> string(5) "2.mp4" [2]=> string(5) "3.jpg" } } } Link to comment https://forums.phpfreaks.com/topic/282644-extract-data-from-object/ Share on other sites More sharing options...
trq Posted October 2, 2013 Share Posted October 2, 2013 See http://forums.phpfreaks.com/topic/282534-extract-data/?do=findComment&comment=1451716 Link to comment https://forums.phpfreaks.com/topic/282644-extract-data-from-object/#findComment-1452219 Share on other sites More sharing options...
Recommended Posts