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? Quote 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. Quote 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>'; Quote Link to comment https://forums.phpfreaks.com/topic/293723-undefined-property-stdclassmessage/#findComment-1501998 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.