我有这样的阵列:
$suppliers = array(
Utility Warehouse => array( Gas => array(0,0), Electricty => array(0,0)),
British Gas => array( Gas => array(93,124), Electricty => array(93,124)),
Eon => array( Gas => array(93,124), Electricty => array(93,124))
);
如何显示以下信息:
Utility Warehouse
Gas: 0-0 Electricity 0-0
British Gas
Gas: 93-134 Electricity: 93-134
Eon
Gas: 93-124 Electricity: 93-134
可以看出所显示的数据如何与阵列中的数据相对应。 我试图这样做:
foreach($suppliers as $a){
echo $a[0];
}
But this does nothing. CONFUSED!