1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
// print_r($array) Array ( [0] => Array ( [accountid] => AH0001 [account] => Company1 [weight] => 22 ) [1] => Array ( [accountid] => AH0002 [account] => Company2 [weight] => ) [2] => Array ( [accountid] => AH0003 [account] => Company3 [weight] => ) [3] => Array ( [accountid] => AH0004 [account] => Company4 [weight] => 9 ) ) // The foreach loop foreach($array as $key => $value) { echo $value[$key]["weight"]; }