I have a big problem. I have two multi-arrays and I want to add one to another and vice versa. To add a multi array I did like this:
$all_items = array("00001" => array('id'=>'00001', 'qty'=>22), "00002" => array('id'=>'00002', 'qty'=>3));
$new_items = array("00005" => array('id'=>'00005', 'qty'=>12));
$all_items = array_merge_recursive ($all_items, $new_items);
It works fine. But how do I do when I want to remove an array? This is how I'm trying to do it but I'm not even close to succeed :-(
$del_items = values;
if($del_items)
{
$all_items = array_diff ($all_items, $del_items);
}
values is the value I've changed a lot, but it doesn't work. What should I do?