06-03-2008, 10:12 AM
|
#8 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
The use of discrete global variables for something like this seems a little excessive. The data pattern is that of a simple array with $munitn being associated with some value. I can't see why using many different variables would be preferred over a simple array.
PHP Code:
$munit = array ();
while ($row = mysql_fetch_assoc($result))
{
$munit[$row['munit']] = (int) $row['mvar'];
}
var_dump($munit);
|
|
|
|