in reply to Re: Re: Help me not use codefor($i=0;$i=$#array;$i++)/code...Please!
in thread Help me not use for($i=0;$i=$#array;$i++)...Please!

And what's worse, if you have consequetive elements equal to 5, only of them is removed. Because the splice moves everything following one down, but the next iteration ups the counter.

-- Abigail

Replies are listed 'Best First'.
Re: Re: Help me not use codefor($i=0;$i=$#array;$i++)/code...Please!
by iakobski (Pilgrim) on Jun 21, 2001 at 15:38 UTC
    If you need to splice in a loop there is an easy solution, just count down to zero rather than counting up in the normal way.

    -- iakobski