I am reading a xml file and saving the data in array.But I am not able to use the array values later.I have declared everything as global. When I put an alert(myData[3]); I am getting "undefined".Please help.
Below is my code:
function modify_data(xml)
{
//alert("tyur");
$(xml).find('person').each(function(){
phone = $(this).find('phone').text();
email = $(this).find('email').text();
name = $(this).find('name').text();
myArray_name[n]= name;
myData[n]=myArray_name[n];
alert(myData[n]);
n=n+1;
});
alert(data);
alert(myData[3]);
}