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 ! 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 ) { 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. 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
Archived
This topic is now archived and is closed to further replies.