vincej Posted February 1, 2011 Share Posted February 1, 2011 I'm using the following code. I have tried placing parenthesis around $date1 and $date2 to separate them. No matter where I place the parenthesis Dreamweaver keeps giving me a syntax error. If I remove the second operator $date2 with the && the error goes. checked all my books but I can't see what is probably a stupid error ! if ($row_sales_shipping_tax['cdate'] >= $date1 && <=$date2 ) Thanks for the help ! Quote Link to comment https://forums.phpfreaks.com/topic/226395-why-do-multiple-operators-in-an-if-statement-should-give-an-error/ Share on other sites More sharing options...
BlueSkyIS Posted February 1, 2011 Share Posted February 1, 2011 if ($row_sales_shipping_tax['cdate'] >= $date1 && $row_sales_shipping_tax['cdate'] <=$date2 ) { Quote Link to comment https://forums.phpfreaks.com/topic/226395-why-do-multiple-operators-in-an-if-statement-should-give-an-error/#findComment-1168525 Share on other sites More sharing options...
Maq Posted February 1, 2011 Share Posted February 1, 2011 You have to show both values being compared for each logical operation. Quote Link to comment https://forums.phpfreaks.com/topic/226395-why-do-multiple-operators-in-an-if-statement-should-give-an-error/#findComment-1168527 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.