[TriLUG] Perplexed
Steve Hoffman
srhoffman at gmail.com
Tue Apr 4 11:34:27 EDT 2006
I did it with the php date function instead of calling the system date and
it seems to eval fine.
<?php
#Changed This
$day = date("l");
# End Change
print "<br>Day is $day - Before<br>";
switch ($day) {
case "Monday":
print "<br>Day is $day - During<br>";
$startdated = `date +%Y-%m-%d -d 'a week ago' ` ;
break;
case "Tuesday":
print "<br>Day is $day - During<br>";
$startdated = `date +%Y-%m-%d -d '8 days ago' ` ;
break;
}
#Added this
echo $startdated;
#End Add
print "<br>Day is $day - After<br>";
?>
More information about the TriLUG
mailing list