If the word can be printed before, but to the back of the print does not come out

Source: Internet
Author: User
The If statement can be printed before it is printed in the back.
foreach ($sale _row as $key = + $value) {
$sales _id[]= $sale _row[$key] [' sales_id '];
}

// Print_r ($sales _id); exit;
There are no activities that are still in progress
if (Empty ($sale _row)) {
echo message_and_redirect (' alert ', ' currently no promotions! ',-1);
Exit
}
Print_r ($sales _id); exit;

Want to ask the first red Word to print out
But the second red word is not printed, the page is blank, do not know the middle of this sentence if there is a mistake,
When all the backstage events are out of date, the page does alert you that there are no promotions and returns. There is no mistake.
A little confused?
New posts, please help


------Solution--------------------
Print first before the IF
Print_r ($sale _row);

------Solution--------------------
Print_r ($sales _id); exit;
There are no activities that are still in progress
if (Empty ($sale _row)) {
echo message_and_redirect (' alert ', ' currently no promotions! ',-1);
Exit
}
Print_r ($sales _id); exit;

If there is an exit in your if, ah, if you do this, then of course there is no print.
------Solution--------------------
Just from the footage you intercepted, it doesn't look wrong.

Where there might be a problem, you just didn't post it.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.