Re: I have a function wrote by myself, try it.

From: Date: Tue, 17 Jul 2001 11:18:35 +0000
Subject: Re: I have a function wrote by myself, try it.
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-8349@lists.php.net to get a copy of this message
doesn't it somehow look like array_splice() / PHP ? "Tttk" <tttk@263.net> wrote in message news:20010717075254.36748.qmail@pb1.pair.com... > 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 > > >

« previous php.windows (#8349) next »