Jump to content

SarasotaSam

New Members
  • Posts

    2
  • Joined

  • Last visited

SarasotaSam's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I need to include the Option because this is an order and many times it is not selected, so I need it not to print. This is what does not work: if (trim($option_second) == "") { echo ""; } else { echo "<strong>Option:</strong> $option_second"; } Though the contents of the field does not print if it is empty. "Option:" does print whether it is empty or not. I am using (trim($option_second) == "") because this is a result of search in MYSQL. Thank you.
  2. I have the following for not printing an empty field in the MYSQL table: if (trim($option_second) == "") { echo ""; } else { echo "<strong>Option:</strong> $option_second"; } I have a search page now that displays the records for the MYSQL table, but I do not know how to hide the records that are empty like the above code. Here is what I have: Option: <?= $items['option_second']; ?> I would like this to not print if empty like the first code. Thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.