RE: [PHP] What am I missing with this code?
| From: | Ford, Mike [LSS] | Date: | Fri, 08 Nov 2002 12:24:29 +0000 |
| Subject: | RE: [PHP] What am I missing with this code? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-123360@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: John Meyer [mailto:johnmeyer_1978@yahoo.com]
> Sent: 08 November 2002 11:45
>
> for($i=1;$i<13;$i++) {
> ?>
> <li><a
> href="categoryresult.php?condition=<?=urlencode("where
> month(UserDOB)=" .
> $i)?>"><?=jdmonthname($i,0)?> (<?=$i?>)</a></li>
> <?php
> }
> ?>
>
> All it's printing out is "November" and "December", even
> though the month is
> incrementing.
You don't seem to have grasped what a Julian day number is -- what you're producing here
is the monthname of 12 consecutive days in IIRC about 4000BC which presumably just happen to fall in
what would have been November and December had such months existed in that year!
This is a case where I really must suggest you RTFM, as there is a perfecxt example of what you want
to do in the only user note at http://www.php.net/manual/en/function.jdmonthname.php
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211