title: How to assign PHP array values to JavaScript array
body: <p>How to assign PHP array values to JavaScript array?</p>
  <p>Using below PHP code I am storing data in PHP array:</p>
  <pre><code>&lt;?php
  $str_query=&quot;SELECT title,description FROM tablename ORDER BY title&quot;;
  $rs_sch=GetRecordset($str_query); 
  
  $int_count=0;
  $schd_arr = array();
  while(!$rs_sch-&gt;EOF())
  {
  $schd_arr[$int_count] = $rs_sch-&gt;Fields(&quot;title&quot;).&quot;: &quot;.$rs_sch-&gt;Fields(&quot;description&quot;);
  $rs_sch-&gt;MoveNext();
  $int_count++;
  }
  ?&gt; 
  </code></pre>
  <p>Using below JavaScript code I am trying to store PHP array data into JavaScript array</p>
  <p>What and how to write variable at below 2 mentioned locations so my code can work?</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;
  var pausecontent=new Array()
  for (sch_cnt=0; sch_cnt&lt;*Here I want to assign value of $int_count php variable*; sch_cnt++)
  {
  pausecontent[sch_cnt]=&lt;?php *Here I want to assign php array and counter values (something like this - $schd_arr[sch_cnt];)* ?&gt;;
  }
  &lt;/script&gt;
  </code></pre>