If statements can be printed before, but cannot be printed later. & nbsp; foreach ($ sale_row & nbsp; as & nbsp; $ key = & gt; $ value) {& nbsp; & nbsp; $ sales_id [] = $ sal if statement can be printed before, but cannot be printed later
Foreach ($ sale_row as $ key => $ value ){
$ Sales_id [] = $ sale_row [$ key] ['sales _ id'];
}
// Print_r ($ sales_id); exit;
// No ongoing activities
If (empty ($ sale_row )){
Echo message_and_redirect ('alert ',' no promotions currently! ',-1 );
Exit;
}
Print_r ($ sales_id); exit;
I want to ask if the first red word can be printed.
However, the second red text cannot be printed, and the page is blank. I don't know where the intermediate sentence if is wrong,
When the background shows that all activities are past due time, alert prompts that there are no promotions currently and returns them. No error.
Why not?
New users post, please help
------ Solution --------------------
Print before if
print_r($sale_row);
------ Solution --------------------
// Print_r ($ sales_id); exit;
// No ongoing activities
If (empty ($ sale_row )){
Echo message_and_redirect ('alert ',' no promotions currently! ',-1 );
Exit;
}
Print_r ($ sales_id); exit;
There is an exit in your IF; ah, of course there will be no printing after executing this.
------ Solution --------------------
I can't see the problem from the clip you captured.
Where something went wrong, you just didn't post it.