if then else?
| From: | Glyndower | Date: | Sun, 19 Aug 2001 04:13:20 +0000 |
| Subject: | if then else? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-63347@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Glyndower [mailto:idesign@tampabay.rr.com]
Sent: Sunday, August 19, 2001 12:12 AM
Cc: php-general@lists.php.net
Subject:
Ok, here we go....
I'm new to PHP and also to MySql, but i'm making a pretty good go so far.
Until now, lol
I have a mysql database with several optional feilds (pe1.pe2.pe2,e1,e2,e3,
etc)
What I'm looking for is a way to check the value of each optional feild and
if said feild is "not null" or contains data. I want to create a header for
that feild and then a bulleted list of the options in the feilds under the
header.
i.e something along the lines of:
<?php if (pe1 = not null) print(Professional Education)?> <li> <?php
printf(pe1)?> <li> <?php printf(pe2)?> <?php else (quit and check next set
of optional feilds)?>
So the final output would end up like:
Professional Education
* College
* High School
* Middle School
TIA