You can used any sign or symbol between two value return like in ajax call file return echo $a.'###'.$b;
When its return value at ajax success funcation you can split that value.
$.ajax({
url: 'example.php',
type :'post',
data: 'val:val',
success: function(data){
//Split using youe symbol.
var arr=data.split('###');
//For first value $a.
alert(arr[0]);
//for second value $b.
alert(arr[1]);
}
});
When its return value at ajax success funcation you can split that value.
$.ajax({
url: 'example.php',
type :'post',
data: 'val:val',
success: function(data){
//Split using youe symbol.
var arr=data.split('###');
//For first value $a.
alert(arr[0]);
//for second value $b.
alert(arr[1]);
}
});
This comment has been removed by a blog administrator.
ReplyDelete