Well, if you knew (for instance) that $A[2] should be removed then you
could do something like:

<?php
foreach ($A as $key => $value)
{
  if ($key < 2)
  {  $B[$key] = $value; }
  elseif ($key > 2)
  {  $B[($key - 1)] = $value; }
}
?>

Modify the above code as needed...

-Dan

On Tue, 2003-08-19 at 22:25, Decapode Azur wrote:
> is it possible to remove an element of an indexed array such as this exemple
>       $A = array('a', 'b', 'c', 'd', 'e', 'f');
> in a way that we can optain this result :
>       $A = array('a', 'b', 'd', 'e', 'f');
> 
> something like that perhaps ?
> array_remove($A, 2);
> 
> If such a function does not exists, what would be the more efficient way to 
> do so a lot of time on very big arrays ?
> 
> 


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

Reply via email to