deansaddigh Posted March 23, 2010 Share Posted March 23, 2010 im getting the above error, can anyone tell me why, i cant seem to find out, i have checked comparison operators and looks like it should work, the error refers to this line of code else if($durationweeks >=12 && <=23) { $courseprice = 95; } Quote Link to comment https://forums.phpfreaks.com/topic/196227-parse-error-syntax-error-unexpected-t_is_smaller_or_equal/ Share on other sites More sharing options...
salathe Posted March 23, 2010 Share Posted March 23, 2010 You need to have two sides to each comparison, the variable will not carry through to the second comparison (against 23). else if($durationweeks >=12 && $durationweeks <=23) Quote Link to comment https://forums.phpfreaks.com/topic/196227-parse-error-syntax-error-unexpected-t_is_smaller_or_equal/#findComment-1030504 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.