title: How to encode 2 dimentional PHP array to Javascript Array?
body: <p>Here's my problem, i have a php array like this:</p>
  
  <pre><code>$output = array(array(1,1,1,1),array(2,2,2,2),array(3,3,3,3));
  </code></pre>
  
  <p>after the array was encoded to json i got this:</p>
  
  <pre><code>$output = {"1":[1,1,1,1],"2":[2,2,2,2],"3":[3,3,3,3]}
  </code></pre>
  
  <p>all i want is to pass the PHP array to Javascript so that the JS looks like this:</p>
  
  <pre><code>var output = [[1,1,1,1],[2,2,2,2],[3,3,3,3,]];
  </code></pre>
  
  <p>Thanks in advance...</p>