|
-
Aug 31st, 2005, 04:08 AM
#1
Thread Starter
Hyperactive Member
listing events under dates ?
hello, i have some php which takes some news items out of a sql database and lists them in date order, however i would like to make it so it lists them under the date eg: 30th aug - news 1, news 2 29th aug - news 1 etc.
im not sure how to do it.
thanks
Last edited by richsmith; Sep 1st, 2005 at 07:35 AM.
Richard <><
-
Sep 1st, 2005, 02:39 AM
#2
Thread Starter
Hyperactive Member
Re: listing events under dates ?
-
Sep 1st, 2005, 05:06 AM
#3
PowerPoster
Re: listing events under dates ?
Datie()? I think you mean date($row[6]) 
Just have a variable hold the current date, and just do a check if the current date <> old date in variable, if it is, print a row (the "August 1st" one in the example below), assign the current date to the variable.
(I'm assuming you mean it would appear like this,
------August 1st------
News Item One
News Item 2
------August 3rd-----
News Item 3
News Item 4)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|