im newbie in javascript .. i need help
i have 2 arrays in PHP:
Code:
print_r ($b);
print_r ($a);
i want to use both of the arrays to javascript function :
Code:
echo "<SCRIPT LANGUAGE='javascript'> gettemplate('$array1');</SCRIPT>\n";
i want to pass $a array and $b array to this function (gettemplate) , how i do that ? by using json ? i didn't find any examples of passing 2 arrays to javascript function ..
THANKS !