06-02-2008, 03:57 PM
|
#2 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
I need more info like:
1. the code you have that retrieved those 5 separate array's from the DB,.
2. why are you getting 5 separate arrays from the DB?
the only easy way i can see is by:
PHP Code:
$arr1 = array ( 0 => 1, 1 => 4 ); $arr2 = array ( 0 => 2, 1 => 19 ); $arr3 = array ( 0 => 4, 1 => 18 ); $arr4 = array ( 0 => 5, 1 => 5 ); $arr5 = array ( 0 => 6, 1 => 7 ); $arr6 = array ( 0 => 7, 1 => 19 ); $arr7 = array ( 0 => 9, 1 => 6 );
$mUnit1 = $arr1[1]; //and so on
//or a variable variable: ${'mUnit'.$arr1[0]} = $arr1[1]; //gives us $mUnit1 variable //and so on
not particularly very dynamic but unless i see the rest of your code or even a schema of your data i cant accurately help.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
Last edited by sketchMedia : 06-02-2008 at 04:00 PM.
Reason: spelling
|
|
|
|