In my php file
foreach($qry_1 as $v)
{
$subcat=array('title'=>$v['title'],'cat_id'=>$v['cat_id']);
echo json_encode($subcat);
}
in my jquery file
$.ajax({
type:'POST',
url:"php/process.php",
data:{cat_id:cat_id},
dataType:"json",
success: function(data){
//how to loop through data to show in div
});
}
})
in my html file
<div id="title">
</div>
i want to show my json data in div so how can i loop through the json data received from php at jquery and how can i show it in my html file