Possible Duplicate:
PHP: How to remove specific element from an array?
How can i remove a line from an array where the key name = a given target...such as
[name] => super [price] => 65.87 [quantity] => 25 [addtocart] => 1
say i wanted to remove the [addtoc开发者_如何学Goart] => 1
part
I believe you want to unset($arr['addtocart']);
$vars = array('name' => super, 'price' => 65.87, 'quantity' => 25, 'addtocart' => 1);
unset($vars['addtocart']);
精彩评论