How can you create a multidimensional array that contains keys and then traverse it with foreach.
It's because I have an array with data in php and I want to return it with ajax to jquery.
I have this and it does not work. And I want to do it with foreach ();
var persona = [
var persona1 = ["nombre"=>"Luis","Edad"=>"32"],
var persona2 = ["nombre"=>"Alex","Edad"=>"27"]
]
for(var i=0;i<persona.length;i++){
alert(persona[i]["nombre"]);
}