At 06:24 PM 1/2/03, David Busby wrote:
Suppose you have an array in PHP like
     $ar = array("a", "b", "c", "d", "e", "f", "g");
Now say you want to remove the 3rd item
     unset($ar[2]);
All good?  Not really...the array doesn't get shifted down, how could one
pull that off (or should I spin the array and recreate without the undesired
values?

Try:
        array-splice( $ar, 2, 1 )

http://www.php.net/manual/en/function.array-splice.php



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to