Jim Lucas wrote:
Robert Cummings wrote:
I want to show the dates for all Fridays +-30 days from a specific date.
For example, given today's date (8/11/2009) the Fridays that fall +-30
days are July 17, July 24, July 31, Aug 7, Aug 14, Aug 21, Aug 28, and
I'm curious, how would you guys solve this?
$fridays = array();
for( $i = -30; $i <= 30; $i++ )
$mod = $i < 0 ? $i : '+'.$i;
man, please use some parenthesis...
my translation of the above would be the following:
$mod = (($i < 0) ? $i : ('+'.$i));
would that be correct?
Yes... in a superfluous hold-my-hand sort of way :)
Application and Templating Framework for PHP
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php