Basically i have a field in one of my tables populated by INT numbers, i want to grab the field count from the row that equates to an array element and display it. The grabbing works and it seems to find the field count values ok, but doesn't display them correctly, instead i get a list of my fields i.e. 1,2,3 etc and they all have a [0] which is correct apart from the one that is supposed to be the value 3 but instead i just get [] !!!
any ideas ??
Code: Select all
$theArray=array("1","2","3","4","5","6","7","8");
$countarray=count($theArray)-1;
$content = "<table width="65%" align="center" border="1" cellpadding="0" cellspacing="0">";
$x=0;
for ($x=0;$x<=$countarray;$x++) {
$sql = $db->sql_query ( "SELECT count AS the_count FROM mytbl where test='$theArrayї$x]'" );
$result = sql_fetch_array($sql);
$total_count = $resultїthe_count];
$content .= "<tr><td size="50%"><strong><big>·</big></strong>$theArrayї$x]</td><td size="50%" align="center">ї$total_count]<br>";
$total_count=="0";
}