Re: echo date("l");

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Nichel wrote:
Khristian Hamilton-Bailey wrote:
Hi,
I currently use the date function as follows:
<?php
$day= date("l");
?>
so I can then use this to call records from a database where todays day
matches that of a record, however I would also like to call records for
tomorrow, is there a way in which I could use the date function to add one day so that as well as the above i could also use something like $tomorrow=
xxxxxxxxxxxxxxxxx
Many thanks for any help.
Khristian


http://us3.php.net/date

Look at example 3

While that would work surely it's more efficient to call date('l', strtotime('+1 day')), 1 date call and 1 strtotime call than to call date three times? It would need a test script to find out, but even if they're almost the same I find the strtotime solution easier to read.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux