Re: Problem with Not displaying HTML if data not found
| From: | Jason Wong | Date: | Tue, 23 Jul 2002 03:56:36 +0000 |
| Subject: | Re: Problem with Not displaying HTML if data not found | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20722@lists.php.net to get a copy of this message | ||
On Tuesday 23 July 2002 11:58, markbm wrote:
> I am trying to develop a page that, in certain places, I only want it to
> display the <TR> and <TD>s if data is found for a given field. For
> example, if I only have an image for the first floorplan of a house, I do
> NOT have an image for the second floorplan of a house, then show the first
> floorplan image only.....skip over that next row because the field in the
> db is empty.
>
> The problem that I'm having is that the syntax that I've been using to
> define "empty" in the db field does not always work. The code reads:
>
> if ($result[FLRPLAN_2]<>" ") {
Try:
if (!empty($result['FLRPLAN_2'])) {
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Reading is to the mind what exercise is to the body.
*/