PX : code

Remove from array by Mårten Andersson
Download this code


<?php
##This function removes a specific field in an array.
##INPUT: array and the index number of the field to remove.
##OUTPUT: new array shortend by one.
function plopOut($arbArr$cnt) {
    
$returnArr = array();
    for (
$arbCnt=0;$arbCnt<count($arbArr);$arbCnt++) {
        if (
$cnt!=$arbCnt) {
            
$returnArr[]=$arbArr[$arbCnt];
        }
    }
    return 
$returnArr;
}
?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.