Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Posts
    217
    Thanks
    25
    Thanked 1 Time in 1 Post

    between dates (noob question)

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

    ?>

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,027
    Thanks
    2
    Thanked 315 Times in 307 Posts
    => should be >=
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Posts
    217
    Thanks
    25
    Thanked 1 Time in 1 Post
    Thanks for your reply, but there is still something wrong with the coding

  • #4
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,027
    Thanks
    2
    Thanked 315 Times in 307 Posts
    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.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •