| Posted by Els on 09/28/05 10:26 
Toby Inkster wrote:
 > Els wrote:
 >
 >> now it appears I have to test them on all different days of the week as
 >> well? :-(
 >
 > You do if you use day-dependent functions in server-side scripts.
 >
 > <?php
 > 	$day = (int)date('w');
 >
 > 	if ($day)
 > 	{
 > 		print "<p>The day of the week (in numerical "
 > 		print "form) is {$day}.</p>\n";
 > 	}
 > ?>
 >
 > Spot the problem.
 
 I suppose I would have to know what 'w' stands for before I could spot
 any problem?
 
 My knowledge of PHP doesn't extend beyond the use of an include or a
 simple if/else statement yet. I know that 'int' rounds a number to an
 integer, but that's about as much as I can see in the above snippet.
 Just a guess: somewhere in the week the value of 'w' rounds down or up
 to the wrong integer to be accurate for the day?
 
 --
 Els                     http://locusmeus.com/
 Sonhos vem. Sonhos vão. O resto é imperfeito.
 - Renato Russo -
  Navigation: [Reply to this message] |