Friday, 9 September 2011

Javascript Associative Arrays

I've spent some time  looking into Javascript associative arrays.  But javascript doesn't have associative arrays. it has objects that can have values that can be accessed in a similar way to associative arrays in perl and PHP. Im no expert but heres how I created a multidimensional javascript array  from a PHP array .
The PHP  array has 4 levels  , that are read from a database .

So I've  read data from the database and  created a multidimensional PHP associative array

$ic[$sy][$si][$pr][$co]=$value;

so the php writes some javascript


No comments:

Post a Comment