2017-07-02 29 views
-2
print_r ($bill_details); 

结果

Array 
(
    [0] => Array 
     (
      [id] => 355 
      [bill_details] => 19.90 
      [st_id] => 0 
      [user_id] => 0 
      [status] => 0 
     ) 

) 
+1

得到每个值又是什么问题呢?你确定你读过[问]或[mcve]吗? –

+0

我neet转换为回显每个var值 –

回答

0
foreach ($array as $key => $value){ 
    echo "Key is $key and value is $value"; 
} 

echo $array[0]['id']; 

那么你可以得到关键的电流值。由于

+0

你忘了'as' –

+0

谢谢......... –

+0

谢谢@u_mulder – NokibRokes

0

当您使用内阵的阵这样你就可以使用里面的foreach的foreach像

<?php 
$bill_details[] = array("id" => 355, "bill_details" => 19.90, "st_id" => 0, "user_id" => 0,"status" => 0); 
print_r($bill_details); 

foreach($bill_details as $key => $value){ 
    foreach($value as $vala){ 
     echo $vala; 
    } 
} 
?>