dynamic include() in while loop

From: Date: Sun, 12 Dec 2004 04:06:59 +0000
Subject: dynamic include() in while loop
Groups: php.general 
Request: Send a blank email to php-general+get-204086@lists.php.net to get a copy of this message
this is a brain buster, at least for me. i have a while loop (results from mysql) which display news articles. i want to include() a file if there hasn't been a news article posted "today" meaning after midnight 12am to 12pm midnight... but if there are articles the articles would be echo'd before the include and the rest of the articles below the include.. eg, Article (today) Article (today) include(); More articles (not today) .. but if there are no Articles posted "today" it would show up as: include(); Article Article i want to know if this is possible, if so, can anyone give me an example? the articles are dated in unix timestamp. cheers

« previous php.general (#204086) next »