Jan 21, 2010
Assign PHP Array to Javascript Array
I am describing here a very useful method for getting the values of a PHP array in JavaScript.
For this we need to assign the PHP array values to a array in JavaScript.
<?php
$a = array('A','B','C');
?>
<html>
<head>
<title>Assign PHP Array to Javascript Array</title>
<script language="javascript">
function showValues(){
var a=new Array;
<?php
for($i=0;$i<count($a);...
read more
