嗨,我想在 php 中保存数组中的记录。我得到像这样的数组
Array
(
[0] => Make
[1] => Model
[2] => Year
[3] => SKU
)
Array
(
[0] => HTC
[1] => Diamond
[2] => 2008
[3] => HTC Touch Diamond
)
Array
(
[0] => Samsung
[1] => M-900
[2] => 2007
[3] => MM-A900M
)
Array
(
[0] => AT&T
[1] => PDA
[2] => 2002
[3] => 8525PDA
)
Array
(
[0] => AT&T
[1] => PDA
[2] => 2003
[3] => 8525PDA
).
以上数据来自 foreach 循环,例如foreach($data as $row){ print_r($row);}
。现在我想针对第一个数组索引(如 make、model、year 和 sku)保存较低的记录。数组索引(make、model、year、sku)可以更少或更多意味着动态。如何我可以这样做吗?纳克斯