PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
will83
Forum Commoner
Posts: 53 Joined: Thu Nov 10, 2005 3:13 pm
Post
by will83 » Sun Nov 13, 2005 4:22 pm
Hi
Can anyone tell me whats wrong with this statement:
Code: Select all
<?php
if (date("m") == "Nov") {
echo "selected";
}
?>
Thanks
Will
ambivalent
Forum Contributor
Posts: 173 Joined: Thu Apr 14, 2005 8:58 pm
Location: Toronto, ON
Post
by ambivalent » Sun Nov 13, 2005 4:40 pm
date("m") returns the numeric month. Try:
wtf
Forum Contributor
Posts: 331 Joined: Thu Nov 03, 2005 5:27 pm
Post
by wtf » Sun Nov 13, 2005 4:40 pm
date("m") will return numric representation of the month. What you need to do is user date("M")
will83
Forum Commoner
Posts: 53 Joined: Thu Nov 10, 2005 3:13 pm
Post
by will83 » Sun Nov 13, 2005 4:43 pm
ahhhhhh
Cheers