title: Error using json_encode in php
body: <p>I'm having some trouble when I try to use php's JSON encode function</p>
  
  <p>what I'm doing:</p>
  
  <pre><code>echo json_encode($ppar, JSON_PRETTY_PRINT);
  </code></pre>
  
  <p>now the variable $ppar is an associative array with a whole bunch of data in it. I can get it to work with out the added parameter, but not with it, and when I looked up on php.net it does say there that the 2nd parameter is valid so I don't get what I'm doing wrong.</p>
  
  <p>this works (except for the fact everything is squished together):</p>
  
  <pre><code>echo json_encode($ppar);
  </code></pre>
  
  <p>but this:</p>
  
  <pre><code>echo json_encode($ppar, JSON_PRETTY_PRINT);
  </code></pre>
  
  <p>gives me this error:</p>
  
  <blockquote>
    <p>Warning: json_encode() expects exactly 1 parameter, 2 given in /home/www/mysite/pp.php on line 10</p>
  </blockquote>
  
  <p>and the output is null.
  I've been going to this for reference: <a href="http://php.net/manual/en/function.json-encode.php" rel="nofollow">http://php.net/manual/en/function.json-encode.php</a></p>