Php array remove element & with key element

by Prabakaran 2012-07-30 16:59:13

$array = array("key1" => "value1", "key2" => "value2");
print_r($array);
unset($array['key1']);
print_r($array);
$key = array_search('value2', $array);
unset($array[$key]);
print_r($array);
1131
like
0
dislike
0
mail
flag

You must LOGIN to add comments