mysql_fetch_array places 2 records for each one returned (example)
Array
(
[0] => 56
[location_id] => 56
)
Is there any way to delimate that and have the key present only once?
here is my code :
/*
*
*
* Start code
*
*
*/
while ($aRow = mysql_fetch_array($sResult) ) {
print_r($aRow);
foreach ($aRow as $key => $sValue) {
$sData[$key] = "SELECT * FROM location WHERE region='$sValue' AND region
!='yes'";
$sDataResult[$key] = mysql_query($sData[$key], $sDbcnx) or
die(mysql_error());
/* print Main heading linking to no where */
print "<OPTION VALUE=\"#\">".$sValue."</OPTION>";
while($aData[$key] = mysql_fetch_array($sDataResult[$key]) ) {
/* grab the data from the main heading and print all the info for that
record */
print
"<OPTIONVALUE=\"indexes/index.php?iLoc_id=".trim($aData[$key]['location_
id'])."\"> ".trim($aData[$key]['location'])."</OPTION>\
n";
} /* end while */
} /* end foreach */
} /* end main while */
/*
*
*
* End Code
*
*
*/