convert php array to json array
by Prakash[ Edit ] 2013-10-16 17:05:48
convert php array to json array :
<script type='text/javascript'>
<?php
$php_array = array('abc','def','ghi');
$js_array = json_encode($php_array);
echo "var javascript_array = ". $js_array . ";n";
?>
</script>