<?php $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43"); echo "Peter is " . $age['Peter'] . " years old.";
//set array in javascript from php array var jsarry = <?php echo '["' . implode('", "', $phparry) . '"]' ?>;