Posted by Sean on 10/26/78 11:33
Try
for($i=0;$i<rowsfound;$i++)
{
echo "Value is " . $row[$i]['close'];
}
that should work.
There was a really nice way of looping through records posted by Shawn
Wilson on alt.comp.lang.php.
$query = " SELECT * FROM `msgsummary` WHERE `userid` = '$userid' ORDER
BY
msgdate DESC";
$result = mysql_query($query) or die('Query failed: ' .
mysql_error());
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
foreach($line AS $_NAME => $_VALUE) { $$_NAME = $_VALUE; }
*** then do whatever you are going to do with that record ***
}
(http://groups.google.com/group/alt.comp.lang.php/browse_frm/thread/b9d5bae96ffa221a/d671978fdec725cc#d671978fdec725cc)
Navigation:
[Reply to this message]
|