View Single Post
Old 06-02-2008, 03:57 PM   #2 (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

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 ( => 1=> );
$arr2 = array ( => 2=> 19 );
$arr3 = array ( => 4=> 18 );
$arr4 = array ( => 5=> );
$arr5 = array ( => 6=> );
$arr6 = array ( => 7=> 19 );
$arr7 = array ( => 9=> );

$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
sketchMedia is offline  
Reply With Quote
The Following User Says Thank You to sketchMedia For This Useful Post:
Dave (06-02-2008)