Show Value Only If Not Empty - PHP -
I have found a form where some fields are optional I then display these areas.
I am trying to show only one value from my database if there is a value. Otherwise, do not show anything.
If there is a value, it needs to be displayed -
& lt; div class = 'category' style = 'font-size: 20px; Background color: f2f2f2 '; ". $ Line ['project_category']" & lt; / Div & gt; Do I 'if (strlen ($ prjcat)> 0)'?
Thank you!
If you are checking a if statement that the value is empty : if (empty ($ line ['project_category'])) {echo "
Comments
Post a Comment