php - If not variable condition is not working -
i'm trying check whether variable value false or true, here code
$print_ready_flag = $_get['print_ready']; // i'm passing either true or false echo $print_ready_flag ; // i'm getting correct value
what i'm trying is,
if ($print_ready_flag == false) { file_name = "albumpdf_" . $order['products_name'] . "_" . $orderid . "_" . $orderpid . ".pdf"; }
when doing above expression evaluating, when tried
if (!$print_ready_flag) {,
if (!(bool)$print_ready_flag)
. expression not evaluating. there way evaluate expression out using comparison operator.
well conditions looks fine. must need add php `error_reporting() in code, find syntax , warnings.
you have typo here:
// missing $ sign file_name = "albumpdf_" . $order['products_name'] . "_" . $orderid . "_" . $orderpid . ".pdf";
and better use print_ready=0
instead of print_ready=false
$_get
. otherwise, must need check ===
value+datatype
Comments
Post a Comment