【发布时间】:2019-06-27 05:40:05
【问题描述】:
我正在尝试使用 unset 从数组中删除 Product 元素,但它不起作用。另外,需要使用 MySql 插入这个数组。我怎样才能做到这一点?
unset( $ar2['Product'] );
print_r($ar2);
结果显示为Product
Array
(
[0] => Array
(
[Product] => Resume, CV, vCard & Portfolio HTML5 Template
[Price] => 10
[Img] => http://localhost/envy-theme-new/wp-content/uploads/2019/01/cv.jpg
)
[1] => Array
(
[Product] => Runhill – Multipurpose Construction WP Theme
[Price] => 39
)
)
【问题讨论】:
标签: php mysql arrays associative-array