Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

unset php return array

function array_remove(array &$arr, $key) {
    if (array_key_exists($key, $arr)) {
        $val = $arr[$key];
        unset($arr[$key]);

        return $val;
    }

    return null;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unset #php #return #array
ADD COMMENT
Topic
Name
5+1 =