Re: Recount array
| From: | (Richard Lynch) | Date: | Wed, 12 Jul 2000 22:29:33 +0000 |
| Subject: | Re: Recount array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6321@lists.php.net to get a copy of this message | ||
In article <B5910D24.29B8%jason@focusdesigngroup.com>,
jason@focusdesigngroup.com (Jason Bryner) wrote:
> I just want to thank every one on this list who has helped so far. It's
> really appreciated.
>
> Now I have another problem to work through. I have a text file that stores
> an array. The array has elements added and subtracted. Below is a sample
> of the text file. How can I "recount" the array to be 0, 1, 2 ?
>
> <?
> $news = array (
> "0" => array("date"=>"7/11/2000",
> "author"=>"Jason Bryner", "next"=>"add")
> ,"2" => array("date"=>"7/13/2000",
> "author"=>"Jason Bryner", "next"=>"add")
> ,"3" => array("date"=>"7/10/2000",
> "author"=>"Jason Bryner", "next"=>"add")
> )
> ?>
I think there's a 'compact' function that does that...
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)