$i=0;
while($i < $mech_weapon_num){
$count = $i + 32;
$splitstring = split(",", $mechstats[$count], 2);
$wepsplitstring = split(" ", $splitstring[0], 2);
$mech_weapon_count = $wepsplitstring[0];
$mech_weapon = $wepsplitstring[1];
$mech_weapon_loc = $splitstring[1];
echo $i;
echo $mech_weapon_count."<br />";
echo $mech_weapon."<br />";
echo $mech_weapon_loc."<br />";
echo "<br />";
$mech_wep_info = array($i => array($mech_weapon_count, $mech_weapon, $mech_weapon_loc));
$i++;
}
echo $i;echo $mech_weapon_count."<br />";
echo $mech_weapon."<br />";
echo $mech_weapon_loc."<br />";
echo "<br />";
outputs:
0 1
CLFlamer
Center Torso
1 1
CLHeavyLargeLaser
Right Arm
2 1
CLHeavyLargeLaser
Left Arm
But my array only consists of:
$counter=0;
while($counter < $mech_weapon_num){
echo $counter;
echo $mech_wep_info[$counter][0]." ".$mech_wep_info[$counter][1]." ".$mech_wep_info[$counter][2]."<br />";
$counter++;
}
0 1
2 1 CLHeavyLargeLaser Left Arm
Array ( [2] => Array ( [0] => 1 [1] => CLHeavyLargeLaser [2] => Left Arm ) ) <- that is the contents of the whole array...
Sorry for the length of this post...any help would really be appreciated! I have a couple of group members at school who are relying on me to get this done. Thanks all.
-Pax
