这是我的代码:
$orders = Array();
foreach ($unassigned as $uorder) {
$array = Array(
"ordid" => $uorder->idord,
"fecha" => $uorder->datorod,
"cliente" => $uorder->idcli
);
array_push($orders[$uorder->user_id], $array);
}
print_r($orders);
结果:
Array (
[vendor1] =>
[vendor2] =>
)
我想做某种
所以我可以用它$orders[vendor1][0][ordid]
来找到供应商下的第一个订单。