<?php
<script type="text/javascript">
$n = array('test','test2');
echo '<script type="text/javascript">';
echo 'var n = new array("', join($n,'","'), '");';
echo '</script>';
?>
var buffer = "";
for(var i in n){
buffer += "n[" + i + "]= " + n[i] + "\n";
}
alert(buffer);
</script>
Wednesday, February 6, 2008
Javascript With PHP Array Examples
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment