title: Parse error: syntax error, unexpected T_STRING 59
body: <p>Please fix this piece of coding. This is what it says "Parse error: syntax error, unexpected T_STRING in /home/timmycpc/public_html/ItemDatabase/index.php on line 49"This is line 12 - 49:</p>
  
  <pre><code>&lt;?php
  $arr = json_decode(file_get_contents("url.com/file.json"),true);
  $page = isset($_GET['p']) ? intval($_GET['p']) : 0;
  $elementsPerPage = 20;
  $elements = array_slice($arr, $page * $elementsPerPage, $elementsPerPage);
  $totalpages = intval(count($arr)/$elementsPerPage);
  if($_GET['p'] == ""){$_GET['p'] = '0';}
  $whatpage = $_GET['p'];
  if($whatpage &gt; $totalpages){echo("&lt;tr&gt;&lt;td&gt;Sorry this page does not exist. Please return to &lt;a href='?p=0'&gt;page 1&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;"); exit;}
  $link1 = $whatpage-1;
  $link2 = $whatpage+1;
  if($_GET['p'] == 0){$backbutton = "";} else {$backbutton = "&lt;a href=?p=" . $link1 . "&gt;Previous Page&lt;/a&gt;";}
  if($_GET['p'] == $totalpages){$nextbutton = "";} else {$nextbutton = "&lt;a href=?p=" . $link2 . "&gt;Next Page&lt;/a&gt;";}
  if($_GET['p'] == $totalpages or $_GET['p'] == 0){$middle = "";} else {$middle = " | ";}
  $pagenav = $backbutton . $middle . $nextbutton;
  echo('&lt;tr&gt;&lt;td colspan="5" align="center"&gt;'.$pagenav.'&lt;/td&gt;&lt;/tr&gt;');
  foreach($elements as $item)
  {
  
  $label = $item['label'];
  $cost = $item['cost'];
  $id = $item['paper_item_id'];
  $member = $item['is_member'];
  $patched = $item['is_bait'];
  
  if ($member == "1") {
  $member = "Yes";
  }else{
  $member = "No";
  }
  
  if ($patched == "1") {
  $patched = "Yes";
  }else{
  $patched = "No";
  }
  
  $str .= "&lt;tr&gt;&lt;td&gt;&lt;embed src="http://www.url.com/SWFViewer/items.swf?id=&lt;?php echo($id); ?&gt;"&gt;&lt;/td&gt;&lt;td style='text-align: left !important;'&gt;&lt;b&gt;Name:&lt;/b&gt; $label&lt;/td&gt;&lt;td&gt;&lt;b&gt;Item ID:&lt;/b&gt; $id&lt;/td&gt;&lt;td&gt;&lt;b&gt;Members:&lt;/b&gt; $member&lt;/td&gt;&lt;td&gt;&lt;b&gt;Cost:&lt;/b&gt; $cost coins&lt;/td&gt;&lt;td&gt;&lt;b&gt;Patched:&lt;/b&gt; $patched&lt;/td&gt;&lt;/tr&gt;";
  }
  
  echo substr($str, 0, -5);
  ?&gt;&lt;/table&gt;&lt;/center&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>