Re: HTML Tables in PHP...

From: Date: Mon, 26 Sep 2005 10:56:20 +0000
Subject: Re: HTML Tables in PHP...
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-40367@lists.php.net to get a copy of this message
hi, silly question: what is EOB? google returns: Your search - EOB site:www.php.net - did not match any documents. I see your (short) side note on EOB on http://www.oracle.com/technology/pub/articles/php_experts/rasmus_php.html EOB is not an entry in your 'programming PHP' (very nice) book index. Is there some more documentation? Maybe something from C? thanks regards mario On Mon, 2005-09-26 at 06:01, Rasmus Lerdorf wrote: > There are many ways to do it. I prefer one of these two: > > <?php > echo <<<EOB > <table align="center" width="$width"> > EOB; > ?> > > or. > > <table align="center"> width="<?php echo $width?>"> > > -Rasmus > > Micah Stevens wrote: > > I apologize, I was being rude. > > > > More specifically, I don't see why you say all html tags should be in single > > quotes. There's several ways you can do things in almost every situation in > > PHP, and I can just as easily say you should always use double quotes. I of > > course would be wrong though. > > > > echo "<table align='center' width='80%'>"; > > > > provides the convenience of inserting variables: > > echo "<table align='center' width='$width'>"; > > > > which you can not do with single quotes, so I could argue that double quotes > > are better. > > > > So, in contrast to my original rude comment (again, I apologize) perhaps I > > should of said: Why do you say that? > > > > -Micah > > > > On Sunday 25 September 2005 9:44 pm, Micah Stevens wrote: > > > >>That's ridiculous. > >> > >>On Sunday 25 September 2005 9:28 pm, balwant singh wrote: > >> > >>>all html tags should be in single quote when used in php like > >>> > >>>echo '<table align=center width=80%>'; > >>>echo '<tr><td align=center>'; echo "HELLO"; > >>>echo '</td></tr></table>'; > >>> > >>> > >>> > >>>With Best Wishes > >>> > >>>Balwant Singh > >>>======================== > >>>INDO ASIAN FUSEGEAR LTD. > >>>A-39, HOSIERY COMPLEX > >>>PHASE - II EXTN., NOIDA > >>>PH: +91 - 120 - 3048140 / 3042222 > >>>FAX: +91 - 120 - 2568 473 > >>>WEB : www.indoasian.com > >>> > >>> > >>> > >>>-------- Original Message -------- > >>>From: "Daryl Booth" <adbooth@t-online.de> > >>>To: php-db@lists.php.net > >>>Subject: [PHP-DB] HTML Tables in PHP... > >>>Date: 9/25/2005 19:05 > >>> > >>> > >>>>How can I give a <table> </table> with all of it's parameters > >>>>in PHP in > >>>>each of the cells there is a variable that gives me the data back but I > >>>>can't get the table to show as it always gives me either this error > >>>>"Parse error: parse error, unexpected T_LNUMBER, expecting ',' > >>>>or ';' > >>>>in C:\FoxServ\www\Dad\proofing\index.php on line 41" or this one when I > >>>>don't put in the quotes "Parse error: parse error, unexpected > >>>>'<', > >>>>expecting ',' or ';' in > >>>>C:\FoxServ\www\Dad\proofing\index.php on line > >>>>41". > >>>> > >>>> > >>>> > >>>>Here is the PHP code I'm using: > >>>> > >>>> > >>>> > >>>><?php > >>>> > >>>>$datei="c:\licence.txt"; > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>if(file_exists($datei)){ > >>>> > >>>> $nachricht="The licence has been validated thank-you!"; > >>>> > >>>> $fp = fopen($datei,"r"); > >>>> > >>>> fpassthru($fp); > >>>> > >>>> fclose($fp); > >>>> > >>>> } > >>>> > >>>>else{ > >>>> > >>>> $nachricht="The licence doesn't exist please contact us! > >>>> > >>>> echo <table width="694" height="501" > >>>> border="0" align="center" > >>>>cellpadding="0" cellspacing="0"> > >>>> > >>>> <tr> > >>>> > >>>> <td height="109" colspan="7"><img > >>>> src="images/1.jpg" width="857" > >>>>height="109" border="0" > >>>>usemap="#Map"></td> > >>>> > >>>> </tr> > >>>> > >>>> <tr> > >>>> > >>>> <td width="39" rowspan="2"><img > >>>> src="images/lefty.jpg" width="39" > >>>>height="394"></td> > >>>> > >>>> <td width="8" height="369">&nbsp;</td> > >>>> > >>>> <td width="240" class="style5"></td> > >>>> > >>>> <td width="12" height="369" > >>>> class="style5">&nbsp;</td> > >>>> > >>>> <td width="407" height="369" > >>>> class="style5"><span > > >>>>>>>>class="style3"><b>$nachricht</b></span><br></td> > >>>> > >>>> <td width="346" rowspan="2"><img > >>>> src="images/righty.jpg" width="346" > >>>>height="394" border="0" > >>>>usemap="#Map2"></td> > >>>> > >>>> </tr> > >>>> > >>>> <tr> > >>>> > >>>> <td height="23" colspan="5"><img > >>>> src="images/bottom.jpg" width="472" > >>>>height="23"></td> > >>>> > >>>> </tr> > >>>> > >>>></table>; > >>>> > >>>>} > >>>> > >>>>?> > > > >

« previous php.db (#40367) next »