...

View Full Version : between dates (noob question)



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



<?php

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";}

?>

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

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

CFMaBiSmAd
11-30-2008, 05: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum