i've got a regular array with keys and values.
is there a simple way to remove the array element based on its value or do i have to foreach-loop it through and check every value to remove it?
See Question&Answers more detail:osi've got a regular array with keys and values.
is there a simple way to remove the array element based on its value or do i have to foreach-loop it through and check every value to remove it?
See Question&Answers more detail:osarray_diff:
$array = array('a','b','c');
$array_to_remove = array('a');
$final_array = array_diff($array,$array_to_remove);
// array('b','c');
edit: for more info: http://www.php.net/array_diff