Passing PHP array to JavaScript object array
<p>I have a table in a database with three columns, <code>prop_no</code>, <code>prop_name</code>, <code>prop_sc</code> in a database and I moved the entries of the last two columns into 2 PHP arrays <code>$propertyNameList</code> and <code>$propertyCodeList</code>.
Now I have a JavaScript class <code>Property</code> and an array <code>propList</code>. I need to move all the values from the two PHP arrays to this JS array using</p>

<pre><code>  propList.push(new Property(1,&lt;?php  echo json_encode($propertyNameList[0]); ?&gt;,
                        &lt;?php echo json_encode($propertyCodeList[0]); ?&gt;));
</code></pre>

<p>using a for loop, where the 1st argument would be the counter variable and the PHP array indices must change with every iteration. How can I do this?</p>