i have this in JAVASCRIPT , a.php –
function gettemplate(realnam) {
alert(realnam)
}
i want to pass all the a[] array in func_a.php to the first file a.php.. to use the array there in javascript .
how i do that?
thanks a lot
EDIT–
ITS WORKS ! , if anyone need —
$a= json_encode($a);
echo "<SCRIPT LANGUAGE='javascript'> gettemplate('$a');</SCRIPT>\n";
🙂
you can return (echo) in the func_a.php an json string http://de.php.net/manual/en/function.json-encode.php and parse it in javascript