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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
anarchoi Posted March 8, 2008 Author Share Posted March 8, 2008 awesome, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.