I have a php array like: PHP Array: $myarray[1]['title'] $myarray[1]['pass'] $myarray[2]['title'] $myarray[2][pass] Code (markup): and I want to change it to a javascript array like: Javascript Array: myarray[1]['title'] myarray[1]['pass'] myarray[2]['title'] myarray[2][pass] Code (markup): How would I do this? (I need a function to change the PHP array into a Javascript one because the values are dynamic) Thanks! ~imozeb
json_encode($myArray); http://www.php.net/manual/en/function.json-encode.php Then I would use JQuery to read the JSON, JSON = Javascript Object Notation Regards, Jesse