Banging my head against a wall with arrays, maybe someone can help me with
the answer.
I have a db query that returns results from 1-100 or more.
I want to put the results into an array and pull them out elsewhere.
I want them to be pulled out in an orderly and expected fashion.
part of function
$sql="Select * FROM blah Where blahid='1'";
run sql
while ($row=mysql_fetch_array($result)) {
$oarray=array('blah1' => $row['lah1'], 'blah2' => $row['lah2'], 'blah3' =>
$row['lah3']);
}
return $oarray
part of display
$OLength=count($oarray);
for ($i = 0; $i < $OLength; $i++){
echo "O1 : ".$oarray['blah1'][$i]."<br>";
echo "O2 : ".$oarray['blah2'][$i]."<br>";
echo "O3 : ".$oarray['blah3'][$i]."<br>";
}
this gets me nothing, and I am unsure where I am going wrong, other then all
over the place.