Feb 12, 2009

PHP: array delete

//deletes a number on index $idx in array and returns the new array
function array_delete($idx,$array) {
 unset($array[$idx]);
 return (is_array($array)) ? array_values($array) : null;
}

No comments: