bravo14 Posted January 7, 2015 Share Posted January 7, 2015 I am using the following code foreach ($fbdata->data as $post ){$posts .= '<li>';$posts .= '<p>' . $post->message . '</p>';$posts .= date('d-M-y', strtotime($post->created_time));$posts .= '</li>';} and if the message propeerty doesn't exist I get the message above. Any ideas on the best way to fix this? Link to comment https://forums.phpfreaks.com/topic/293723-undefined-property-stdclassmessage/ Share on other sites More sharing options...
hansford Posted January 7, 2015 Share Posted January 7, 2015 Post the code. Link to comment https://forums.phpfreaks.com/topic/293723-undefined-property-stdclassmessage/#findComment-1501996 Share on other sites More sharing options...
Barand Posted January 7, 2015 Share Posted January 7, 2015 show the data echo '<pre>', print_r($fbdata->data, 1), '</pre>'; Link to comment https://forums.phpfreaks.com/topic/293723-undefined-property-stdclassmessage/#findComment-1501998 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.