我在数组方面不是很好,所以这可能很简单,但不适合我!我通过 POST 获取一组值,我需要解析它们并将值存储在表中。我应该如何使用经典解析,例如:
foreach($array as $a) {
$text = $a->text;
$name = $a->user->name;
}
等来解析一个看起来像这样的数组:
[item] => Array
(
[tags] => Array
(
[0] => Bluetooth
[1] => WiFi
[2] => USB
)
)
This is the entire POST array:
Array
(
[prodid] =>
[Submit] => Save
[productcode] => 797987
[cat_id] => 66
[brand] => Fysiomed
[name] => asdc asdc asd c
[productnew] => yes
[item] => Array
(
[tags] => Array
(
[0] => Bluetooth
[1] => WiFi
[2] => USB
)
)
[size] => 1
[barcode] => 7979871
[price] => 233.00
[priceoffer] => 0.00
[stock] => 50
[weight] => 0.30
[orderby] => 1
)