I have a function wrote by myself, try it.
| From: | tttk | Date: | Tue, 17 Jul 2001 07:54:02 +0000 |
| Subject: | I have a function wrote by myself, try it. | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8346@lists.php.net to get a copy of this message | ||
Hello,
Today I wasted some time just for the same question met in javascript. I
don't think there are an existed function to solve it, so I write one by
myself. Hope to give you some help.
Followed code is wrote in javascript, I don't want to rewrite in PHP, so do
yourself.
// begin function
function arr_wipe(arrSrc, from, length){
var len = arrSrc.length;
if (from<0 || from>len || from+length>len) return false;
var newArr = new Array();
var j=0;
for (i=0; i<arrSrc.length; i++){
if (i<from || i>=(from+length)){
newArr[j++]=arrSrc[i];
}
}
return newArr;
}
// end function