title: JSON decode is not working with PHP
body: <p>I have a WAMP server with PHP 5.4.3 version. I encoded the data in JSON by php file below is the code (submit.php).</p>
  
  <pre><code>$username = 'User';
  $comment = 'Test comment';
  $date = date("Y-m-d G:i:s");  
  $image = '/img/sephiroth.png';
  
    $return = array(
    'username'=&gt; $username,
    'comment' =&gt; $comment,
    'date' =&gt; $date,
    'image' =&gt; $image  );
    echo json_encode($return); 
  </code></pre>
  
  <p>Now i have a javascript file(script.js).</p>
  
  <pre><code>$.ajax({
              type: "POST",
              url: "submit.php",
              data: dataString,
              cache: false,
              success: function(result){
                      alert(result); //It is showing all the JSON data.
                      $value = result;
                      $data = json_decode($value,true);
                      alert($data);
                          }
             });
  </code></pre>
  
  <p>I want to decode all the JSON data separately. e.g Username, comment, date, image. So, i can show them on webpage, at the moment all data is coming together. I tried multiple times with multiple options (php array or result.username or result['username'] but no luck. </p>
  
  <p>Now i am getting below error.</p>
  
  <pre><code>ReferenceError: json_decode is not defined
      $data = json_decode($value,true);
  </code></pre>