I’ve got some conditions set up in an EE ‘if’ statement, which include some PHP variables for numeric values.
{offer_departure format="%Y%m%d"} < "<?php echo $_SESSION['filter_from']; ?>" && {expiration_date format="%Y%m%d"} >= "<?php echo $_SESSION['filter_to']; ?>" ||
{offer_departure format="%Y%m%d"} < "<?php echo $_SESSION['filter_from']; ?>" && {expiration_date format="%Y%m%d"} < "<?php echo $_SESSION['filter_to']; ?>" && {expiration_date format="%Y%m%d"} > "<?php echo $_SESSION['filter_from']; ?>" ||
{offer_departure format="%Y%m%d"} >= "<?php echo $_SESSION['filter_from']; ?>" && {expiration_date format="%Y%m%d"} >= "<?php echo $_SESSION['filter_to']; ?>" && {offer_departure format="%Y%m%d"} < "<?php echo $_SESSION['filter_to']; ?>" ||
{offer_departure format="%Y%m%d"} >= "<?php echo $_SESSION['filter_from']; ?>" && {expiration_date format="%Y%m%d"} < "<?php echo $_SESSION['filter_to']; ?>"
But they are giving a syntax error when running;
Parse error: syntax error, unexpected T_IS_GREATER_OR_EQUAL in /home/sites/thecruisehub.co.uk/public_html/brain/expressionengine/libraries/Functions.php(656) : eval()‘d code on line 82
I have set the PHP Parse for the template to Input.
The ‘filter_from’ and ‘filter_to’ variables are numeric values rather than strings.
Am I missing something obvious?