|
Posted by comp.lang.php on 09/30/05 18:15
There is no native PHP process to do the equivalent of "array_remove()"
as of yet. Your best would be to slap together a function using
unset($array['element']), as I've had to do.
Bear in mind that in future additions to PHP an "array_remove()"
function might someday exists, it's best that when you create it to
wrap the function around a "function_exists()" conditional block:
if (!function_exists('array_remove')) {
function array_remove($element, &$array, $willSearchKeys) {
// EXERCISE LEFT TO THE STUDENT!
}
}
Phil
Navigation:
[Reply to this message]
|