dflow Posted March 3, 2011 Share Posted March 3, 2011 i want to created a case like the following need help with the syntax: switch (true) { case($fromdate-$todate==17-04-2001-25-04-2011): echo $finalprice = $result; break; } Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 3, 2011 Share Posted March 3, 2011 Try <?php case "$fromdate-$todate" == '17-04-2001-25-04-2011'): ?> Ken Quote Link to comment Share on other sites More sharing options...
dflow Posted March 3, 2011 Author Share Posted March 3, 2011 Try <?php case "$fromdate-$todate" == '17-04-2011-25-04-2011'): ?> cool thanks cool thanks how would i set this range as a special case? if i have a request for 13-04-2011-27-04-2011 how would i set this range as a special case bewteen these dates? lets call it $Easter so if ($Easter){$regularprice+$EasterPrice;} Quote Link to comment Share on other sites More sharing options...
dflow Posted March 4, 2011 Author Share Posted March 4, 2011 bump Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.