Here's an example :

<?php

    $foo = array('a','b','c');

      unset($foo[1]);

      print_r($foo);    // [0] => a [2] => c

    $bar = array('a','b','c');

      $piece = array_splice ($bar, 1 ,1);

      print_r($piece);  // [0] => b 

      print_r($bar);    // [0] => a [1] => c 

?>

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


regards,
philip


On Mon, 25 Jun 2001, Bret R. Zaun wrote:

> Hello,
> how can I complete remove an item out of an array ?
> I tried unset() as well as setting the value to null.
> 
> Both result in the value being null but not the item being deleted.
> 
> Any help is appreciated
> Heiko
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to