I am making an ajax call on click of anchor tag : There i have a number of arrays as output . But i am unable to display those arrays in an HTML table . Please suggest how can i achieve this .
function getdetail(cid)
{
var cid = cid;
var xmlhttp = new XMLHttpRequest();
var url = "c_detail.php";
var params = "cid="+cid;
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('cdetail').innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET",url+"?"+params,true);
xmlhttp.send();
}
My array output looks like this :
Array ( [0] => Array ( [id] => 5088 [start] => first [end] => last [ad_start] =>ad_first [ad_end] => ad_last [cid] => 79 [car] => Dialog ) )
Of-course this shows data as list of arrays without any formatting . I want to display it as HTML table Any help will be appreciated !!! Thanks in advance