[TriLUG] Perplexed
Matt Frye
mattfrye at gmail.com
Tue Apr 4 11:15:36 EDT 2006
Can someone tell me why the following code would not set $startdated
to the correct date? Stuff inside the 'switch' seems to go into a
black hole, even when it evals correctly.
<?php
$day = `date +%A`;
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;
}
print "<br>Day is $day - After<br>";
?>
More information about the TriLUG
mailing list