Re: [HAB] Remove empty cells from an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"OOzy Pal" <oozypal@xxxxxxxxx> wrote in message
news:20050115141422.85573.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Dears,
>
> How can I remove empty cells/places in an array. For
> example:
>
> a[1]='John';
> a[2]='Mike';
> a[3]='Lisa';
> a[4]='';
> a[5]='';
>
> How can I remove a[4] & a[5], so the array is only
>
> a[1]='John';
> a[2]='Mike';
> a[3]='Lisa';

unset($a[4]);

Regards, Torsten Roehr

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux