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; } Link to comment https://forums.phpfreaks.com/topic/229508-var-between-dates-help/ 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 Link to comment https://forums.phpfreaks.com/topic/229508-var-between-dates-help/#findComment-1182457 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;} Link to comment https://forums.phpfreaks.com/topic/229508-var-between-dates-help/#findComment-1182497 Share on other sites More sharing options...
dflow Posted March 4, 2011 Author Share Posted March 4, 2011 bump Link to comment https://forums.phpfreaks.com/topic/229508-var-between-dates-help/#findComment-1182617 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.