[Solved] Can’t seem to figure out this php error [closed]


In your $posts array you are missing a trailing ' quote, and a comma.

$posts array should look like:

$posts[] = array(      
  'stamp' => $data->stamp,
  'userid' => $userid,       
  'body' => $data->body  //**This is line 20.** 

);

Many times in PHP, when it says line 20, you should be looking at line 19.

As a commenter above mentioned I would really recommend using a code editor with syntax highlighting like vim, emacs, Sublime Text, Notepad++ or something similar. Saves my butt every day :).

3

solved Can’t seem to figure out this php error [closed]