ThunderAI Posted March 22, 2012 Share Posted March 22, 2012 How do I do this? It only does the first nine records and wont cycle through the many records in the second dimension. Thanks. // External Loop is 1 - 9 // Internal Loop is 0 - whatever it is //$muarray_s[0] = $facility_id; //$muarray_d[$external_loop][$interal_loop] = $objfields['139339_date']; //$muarray_t[$external_loop][$interal_loop] = $objfields['139339_time']; //$muarray_i[$external_loop][$interal_loop] = $objfields['139339_main_id']; //$array_of_mu[$external_loop][$interal_loop] = $checklist_item_disc; echo "Begin Draw Runway Image Function <br>"; echo "Establish Array Looping Procedure"; for ($j=0; $j<10; $j=$j+1) { // External Loop // This is actually the Condition not the mu for ($k=0; $k<count($array_of_mu); $k=$k+1) { // Internal Loop // This is the Mu Value; echo "Mu Value is ".$array_of_mu[$j][$k]."<br>"; } } Link to comment https://forums.phpfreaks.com/topic/259463-counting-multi-dem-array/ Share on other sites More sharing options...
rythemton Posted March 22, 2012 Share Posted March 22, 2012 Your second loop needs to include the first dimension in the array reference: for ($k=0; $k<count($array_of_mu[ $j ]); $k=$k+1) { Link to comment https://forums.phpfreaks.com/topic/259463-counting-multi-dem-array/#findComment-1330082 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.