View Single Post
Old 06-03-2008, 08:47 AM   #7 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

as i said before, a variable variable will do this:

PHP Code:

while ($result_row mysql_fetch_row($result) )
{
    ${
"munit".$result_row[0]} = $result_row[1];
}

echo 
$munit1' ',
     
$munit2' ',
     
$munit4' ',
     
$munit5' ',
     
$munit6' ',
     
$munit7' ',
     
$munit9
gives us : 4 19 18 5 7 19 6

hope that helps.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
The Following User Says Thank You to sketchMedia For This Useful Post:
Dave (06-03-2008)