|
[Edit] Remove value from an array
EXAMPLEprint_r(array_remove(array('d','a','d','u'),'d',true));
function array_remove($array,$value,$remove_all=false) {
$keys = array_keys($array,$value);
switch($remove_all):
case false:
$key = (count($keys) >= 1 ? $keys[0] : NULL);
unset($array[$key]);
break;
case true:
foreach($keys as $key) unset($array[$key]);
break;
endswitch;
return $array;
}
|
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved

