unset() works for this, how are you using it 
exactly?  Please post a short test script 
that misbehaves for you.

  $arr = array('foo','bar');
  unset($arr[0]);

  print_r($arr); // only $arr[1] = 'bar' exists now

See also: http://www.php.net/unset
          http://www.php.net/array_splice

Regards,
Philip Olson


On Wed, 12 Jun 2002, Martin Clifford wrote:

> Howdy,
> 
> If someone out there could tell me how to get rid of a single key/index pair within 
>an array, it would be great.  I've tried both unset() and empty(), but both destroy 
>the entire array.
> 
> Please CC me directly, as I'm on the digest.
> 
> Thanks in advance!
> 
> Martin
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to