Re: HTML Tables in PHP...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> > To: php-db@xxxxxxxxxxxxx
> > Subject:  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>;
> > >
> > >}
> > >
> > >?>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux