Hi!
In an ajax call, how do I in the most simpliest way convert php array variables from:
$arr = array ('name'=>'John','adress'=>'greenroad 2');
echo json_encode($arr);
into javascript variables:
var name
var adress
I want to be able to print them out in seperate DIVs by using:
document.getElementById('namediv').innerHTML = name;
No replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









