print_r ($bill_details);
Array
(
[0] => Array
(
[id] => 355
[bill_details] => 19.90
[st_id] => 0
[user_id] => 0
[status] => 0
)
)
答案 0 :(得分:0)
foreach ($array as $key => $value){
echo "Key is $key and value is $value";
}
或
echo $array[0]['id'];
然后你可以获得key的当前值。谢谢
答案 1 :(得分: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;
}
}
?>