RE: [PHP-DB] Could be this less complicated?

From: Date: Fri, 11 Aug 2000 01:10:49 +0000
Subject: RE: [PHP-DB] Could be this less complicated?
Groups: php.db 
Request: Send a blank email to php-db+get-1946@lists.php.net to get a copy of this message
---------------------------------------------------------------------------- ----------------- Disclaimer: The information contained in this email is intended only for the use of the person(s) to whom it is addressed and may be confidential or contain legally privileged information. If you are not the intended recipient you are hereby notified that any perusal, use, distribution, copying or disclosure is strictly prohibited. If you have received this email in error please immediately advise us by return email at postmaster@normandy.com.au and delete the email document without making a copy. ---------------------------------------------------------------------------- ----------------- Or <?php $tag=5555; echo "<TD bgcolor='#56a4d8'><FONT size=1><INPUT maxLength=5 name=tag disabled value='$tag' style='HEIGHT: 22px; WIDTH:89px'></FONT></TD>"; ?> This is least complicated i've seen. HTML doesnt require you to use double quotes (or even singles a lot of the time .. but to be safe...) The only situation where this will cause you problems is when you want to embed Javascript where you will need double quotes in some places... its pretty easy though just escape the double quotes or use one of the two solutions below. It mostly comes down to preference. mn -----Original Message----- From: Matt McClanahan [mailto:cardinal@dodds.net] Sent: Friday, August 11, 2000 2:40 AM To: Robert Brownback Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Could be this less complicated? On Thu, 10 Aug 2000, Robert Brownback wrote: > Try this: > > > <?php > $tag=5555; > echo '<TD bgcolor="#56a4d8"><FONT size=1><INPUT maxLength=5 > name=tag disabled value="'.$tag.'"style="HEIGHT: 22px; WIDTH: 89px"></FONT></TD>'; > ?> Or, since there's only one PHP element in there.. <? $tag = 5555 ?> <TD bgcolor="#56a4d8"><FONT size=1> <INPUT maxLength=5 name=tag disabled value="<? echo $tag ?>" style="HEIGHT: 22px; WIDTH: 89px"> </FONT></TD> Matt

« previous php.db (#1946) next »