Deleted

this is a deleted thread

Well, next time, please post the code, not a picture. Pictures do not let us copy it to the replies…

Well, normally, you would do your check outside of the foreach loop. You need to check for values and
if data, then run your foreach loop. If no data, skip that part completely! If you have lines just above the
pix that queries a database, then you would use something like if($result) meaning it has data or you can
check the number of rows it found like if(mysqli_num_rows!=0) then it has data. The foreach loop would
be inside the found-data group like:
if ($results) {
// Do something with the data since you have some
} else {
// display no-data message
}
It depends how you acquired the data for which is the best way. Different for MySQLi and PDO…

Good luck!

Sponsor our Newsletter | Privacy Policy | Terms of Service