I have a form with many form elements that are not allways populated with data, depending on type of product. If I want to print one row – record from mysql db, I want to avoid print column with empty container for data or if I put “%” sign in it. Does anyone has an idea how to do that? Examples are welcome!
Share
You can just check against null or a blank string to see if the column is empty and use
strposto see if ‘%’ appears in it. Only print the column data if the conditions are satisfied:Or in raw php: