anarchoi Posted March 8, 2008 Share Posted March 8, 2008 hi, i'm still new with php and i would just like to display some text depending on today's date, but independently from the year exemple: I'd like to echo "Hi" at march 7th, each year, and only for the duration of this day could anyone give me a part of code that would do this? thanks a lot Link to comment https://forums.phpfreaks.com/topic/95007-display-text-depending-on-date/ Share on other sites More sharing options...
pocobueno1388 Posted March 8, 2008 Share Posted March 8, 2008 <?php $when = date("F j"); if ($when == "March 7") echo "Today is March 7th!"; ?> See if that does what your looking for. Link to comment https://forums.phpfreaks.com/topic/95007-display-text-depending-on-date/#findComment-486660 Share on other sites More sharing options...
anarchoi Posted March 8, 2008 Author Share Posted March 8, 2008 awesome, thanks Link to comment https://forums.phpfreaks.com/topic/95007-display-text-depending-on-date/#findComment-486736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.