Re: Selecting number of news items on frontpage

From: Date: Wed, 28 Feb 2001 20:04:27 +0000
Subject: Re: Selecting number of news items on frontpage
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7025@lists.php.net to get a copy of this message
Hey, If you're using Mysql to store the items, you could use the Limit statement to limit the number of items displayed. If you're using the file system it'd probably be a little more difficult, but not impossible. For example, if the news items were stored in a text file with one entry per line, you could just use file() to convert the file to an array and then loop 7 times--grabbing the first 7 elements (or news items) of the array. Best Regards, Bill Zeller --- Matthew Cothier <matthewcothier@hotmail.com> wrote: > I have a homepage which has a news headline system. > Bascially via form the > admin of the site can submit news which appears on > the front page, the only > problem is the news just keeps coming and I have a > front page with too many > headlines on. > > How can I make it so that say 7 articles appear on > the front page and the > rest can be accessed through some sort of archive? > > Perhaps a link underneath these articles to the > archive? > > And the actual archive a page with the headlines > listed that they can click > on and view the story, the headlines listed in date > order. > > How would I do this? > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-db-unsubscribe@lists.php.net > For additional commands, e-mail: > php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.db (#7025) next »