View Full Version : between dates (noob question)

11-30-2008, 04:03 PM
ehm quite a noob question, but whats wrong with this code?


if ((date("m")==12) && (date("j")=>1) && (date("j")<=5) )) {echo"sinterklaas";}
if ((date("m")==12) && (date("j")=>24) && (date("j")<=25) )) {echo"kerst";}
if ((date("m")==11) && (date("j")=>29) && (date("j")<=30) )) {echo"wow";}


11-30-2008, 04:31 PM
=> should be >=

11-30-2008, 04:45 PM
Thanks for your reply, but there is still something wrong with the coding

11-30-2008, 04:58 PM
It would really help if you told us what you see in front of you. We know something does not work or you would not be posting in a help forum, you have to narrow down the problem by providing relevant information.

Anyway, if you are learning php, developing php code, or debugging php code on a system where error_reporting is set to E_ALL and display_errors is set to ON in your php.ini (stop and start your web server to get any changes made to php.ini to take effect) to get php to help you, you would know that there is a php syntax error due to an excess ) where you have two )) together.