-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I often find myself with code like this:

                <br>[+ $set[$row]{organization_name} +]
                <br>[+ $set[$row]{address1} +]
                <br>[+ $set[$row]{address2} +]
                <br>[+ $set[$row]{address3} +]
                <br>[+ $set[$row]{city} +],
                    [+ $set[$row]{state} +]
                    [+ $set[$row]{postal_code} +]
                    [+ $set[$row]{country} +]
                <br>[+ $set[$row]{phone} +] (V), [+ $set[$row]{fax} +] (F)

But that doesn't deal with missing data, so I have to turn it into:

                [$ if ($set[$row]{organization_name}) $]<br>[+ 
$set[$row]{organization_name} +][$ endif $]
                [$ if ($set[$row]{address1}) $]<br>[+ $set[$row]{address1} +][$ endif 
$]
                [$ if ($set[$row]{address2}) $]<br>[+ $set[$row]{address2} +][$ endif 
$]
                [$ if ($set[$row]{address3}) $]<br>[+ $set[$row]{address3} +][$ endif 
$]
                [$ if ($set[$row]{city}) $]<br>[+ $set[$row]{city} +],[$ endif $]
                    [+ $set[$row]{state} +]
                    [+ $set[$row]{postal_code} +]
                    [+ $set[$row]{country} +]
                [$ if ($set[$row]{phone} || $set[$row]{fax}) $] <br> [$ endif $]
                    [$ if ($set[$row]{phone}) $][+ $set[$row]{phone} +] (V)[$ endif 
$][$ if ($set[$row]{fax}) $], [+ $set[$row]{fax} +] (F) [$endif $]

which is, of course, completely unreadable.  I feel like Winnie-the-Pooh coming down 
the stairs
bump, bump, bump--there must be a better way.

Any thoughts?
- -- 

Kee Hinckley - Somewhere.Com, LLC - Cyberspace Architects
Now Playing - Folk, Rock, odd stuff - http://www.somewhere.com/playlist.cgi

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOr0BWCZsPfdw+r2CEQK+FgCg53SbgoZ0UYnFjvng9RTErhZnjW4AoKD6
EsMrW0fB0MqJoiInTv2MgFJd
=YXCV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to