title: Split doesn't work with json_encode in JavaScript
body: <p>I have an array in php like this:</p>
  
  <pre><code>$array_php = (1,2,3,4,5);
  </code></pre>
  
  <p>In JavaScript I do:</p>
  
  <pre><code>var obj = &lt;?php echo json_encode($array_php); ?&gt;;
  </code></pre>
  
  <p>If I do <strong>alert(obj);</strong> I get the content well without problems: 1,2,3,4,5</p>
  
  <p>If I do:</p>
  
  <pre><code>var elem = obj.split(',');
  </code></pre>
  
  <p>This fail. If I do alert(elem[1]) for example I don't get anything. And the line var elem = ... fails.</p>
  
  <p>If I create the array without json_enconde works fine, but I need access to this object.</p>
  
  <p>What can I do?
  Thanks!</p>