I have an AJAX call on txt_RollNo's blur event to bring std_name,Class,age from database and fill it in txt_name,txt_class,txt_age.
In a single call can I have name,class,age all as a whole in array or any, how to seperate it.
$("#txt_RollNo").blur(function(){
$.ajax({
url:'getSudent.php',
data:'stdID='+ $(this).val().trim(),
success:function(array_from_php)
{
//but here i m receiving php array, how deal in jquery
//$("#txt_name").val(array_from_php);
//$("#txt_Class").val(array_from_php);
//$("#txt_age").val(array_from_php);
}
})
});
getSudent.php echos array as below
<?php
$qry=mysql_query("select * from students where studentID='".$_GET['std_ID']."'");
$row=mysql_fetch_array($qry);
echo $row;
?>