Re: [PHP-DB] HTML Tables in PHP...
Haha.. shows how much I know. *bowing* Hey, Rasmus, thanks for the PHP! -Micah On Monday 26 September 2005 4:29 am, Bastien Koert wrote: > Hey Micah, > > Nothing like telling the guy WHO WROTE THE LANGUAGE about its > shortcuts...lol > > Bastien > > >From: Rasmus Lerdorf <[EMAIL PROTECTED]> > >To: Micah Stevens <[EMAIL PROTECTED]> > >CC: php-db@lists.php.net > >Subject: Re: [PHP-DB] HTML Tables in PHP... > >Date: Sun, 25 Sep 2005 23:56:30 -0700 > > > >Micah Stevens wrote: > > > Rasmus, there's a shortcut for this: > > > > > > > > > > > > > > > > > > Saves me a lot of time, although it can be confusing for those > > > >unfamiliar with > > > > > it. > > > >Yes, I am quite familiar with it ;) > > > >But I don't like it. It's an ugly ASP'ism. > > > >-Rasmus > > > >-- > >PHP Database Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
It's ugly, but if I was looking for form versus ease of use, I'd wouldn't be using PHP. :) -Micah On Sunday 25 September 2005 11:56 pm, Rasmus Lerdorf wrote: > Micah Stevens wrote: > > Rasmus, there's a shortcut for this: > > > > > > > > > > > > Saves me a lot of time, although it can be confusing for those unfamiliar > > with it. > > Yes, I am quite familiar with it ;) > > But I don't like it. It's an ugly ASP'ism. > > -Rasmus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
mario wrote: > 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 EOB doesn't mean anything. You can put whatever string you want there. eg. echo <<< FOOBAR Put stuff here and here and here FOOBAR; This is known as a here-doc. Go to http://php.net/heredoc for documentation on this. -Rasmus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
Hey Micah, Nothing like telling the guy WHO WROTE THE LANGUAGE about its shortcuts...lol Bastien From: Rasmus Lerdorf <[EMAIL PROTECTED]> To: Micah Stevens <[EMAIL PROTECTED]> CC: php-db@lists.php.net Subject: Re: [PHP-DB] HTML Tables in PHP... Date: Sun, 25 Sep 2005 23:56:30 -0700 Micah Stevens wrote: > Rasmus, there's a shortcut for this: > > > > > > Saves me a lot of time, although it can be confusing for those unfamiliar with > it. Yes, I am quite familiar with it ;) But I don't like it. It's an ugly ASP'ism. -Rasmus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
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: > >echo << > EOB; > ?> > > or. > > 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 ""; > > > > provides the convenience of inserting variables: > > echo ""; > > > > 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 ''; > >>>echo ''; echo "HELLO"; > >>>echo ''; > >>> > >>> > >>> > >>>With Best Wishes > >>> > >>>Balwant Singh > >>> > >>>INDO ASIAN FUSEGEAR LTD. > >>>A-39, HOSIERY COMPLEX > >>>PHASE - II EXTN., NOIDA > >>>PH: +91 - 120 - 3048140 / 304 > >>>FAX: +91 - 120 - 2568 473 > >>>WEB : www.indoasian.com > >>> > >>> > >>> > >>> Original Message > >>>From: "Daryl Booth" <[EMAIL PROTECTED]> > >>>To: php-db@lists.php.net > >>>Subject: [PHP-DB] HTML Tables in PHP... > >>>Date: 9/25/2005 19:05 > >>> > >>> > How can I give a 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: > > > > > $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 cellpadding="0" cellspacing="0"> > > > > height="109" border="0" usemap="#Map"> > > > > > > height="394"> > > > > > > > > class="style3">$nachricht > > height="394" border="0" usemap="#Map2"> > > > > > > height="23"> > > > > ; > > } > > ?> > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
On Sun, 2005-09-25 at 13:35, Daryl Booth wrote: > > $nachricht="The licence doesn't exist please contact us! "; close string! > > echo open string! " \"694\" and so on height=\"501\" border=\"0\" align=\"center\" > cellpadding=\"0\" cellspacing=\"0\"> bye mario . -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
Micah Stevens wrote: > Rasmus, there's a shortcut for this: > > > > > > Saves me a lot of time, although it can be confusing for those unfamiliar > with > it. Yes, I am quite familiar with it ;) But I don't like it. It's an ugly ASP'ism. -Rasmus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
boo ... short tags though i admit it's gotta be easier to type. Why I don't like short tags : I use XML a lot. Mark On 26/09/05, Micah Stevens <[EMAIL PROTECTED]> wrote: > > Rasmus, there's a shortcut for this: > > > > > > Saves me a lot of time, although it can be confusing for those unfamiliar with > it. > > -Micah > > > On Sunday 25 September 2005 11:01 pm, Rasmus Lerdorf wrote: > > There are many ways to do it. I prefer one of these two: > > > > > echo << > > > EOB; > > ?> > > > > or. > > > > 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 ""; > > > > > > provides the convenience of inserting variables: > > > echo ""; > > > > > > 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 ''; > > >>>echo ''; echo "HELLO"; > > >>>echo ''; > > >>> > > >>> > > >>> > > >>>With Best Wishes > > >>> > > >>>Balwant Singh > > >>> > > >>>INDO ASIAN FUSEGEAR LTD. > > >>>A-39, HOSIERY COMPLEX > > >>>PHASE - II EXTN., NOIDA > > >>>PH: +91 - 120 - 3048140 / 304 > > >>>FAX: +91 - 120 - 2568 473 > > >>>WEB : www.indoasian.com > > >>> > > >>> > > >>> > > >>> Original Message > > >>>From: "Daryl Booth" <[EMAIL PROTECTED]> > > >>>To: php-db@lists.php.net > > >>>Subject: [PHP-DB] HTML Tables in PHP... > > >>>Date: 9/25/2005 19:05 > > >>> > > How can I give a 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: > > > > > > > > > > > $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 > cellpadding="0" cellspacing="0"> > > > > > > > > > height="109" border="0" usemap="#Map"> > > > > > > > > > > > > > height="394"> > > > > > > > > > > > > > > > > > class="style3">$nachricht > > > > > height="394" border="0" usemap="#Map2"> > > > > > > > > > > > > > height="23"> > > > > > > > > ; > > > > } > > > > ?> > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- theExile.vze.com www.stpaulswalsall.org.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
In a message dated 9/26/2005 1:34:20 A.M. Central Standard Time, [EMAIL PROTECTED] writes: Rasmus, there's a shortcut for this: Saves me a lot of time, although it can be confusing for those unfamiliar with it. -Micah I'm not sure if Rasmus would be too familiar with that one? I heard he was a n00b ;-D - Clint
Re: [PHP-DB] HTML Tables in PHP...
Rasmus, there's a shortcut for this: Saves me a lot of time, although it can be confusing for those unfamiliar with it. -Micah On Sunday 25 September 2005 11:01 pm, Rasmus Lerdorf wrote: > There are many ways to do it. I prefer one of these two: > >echo << > EOB; > ?> > > or. > > 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 ""; > > > > provides the convenience of inserting variables: > > echo ""; > > > > 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 ''; > >>>echo ''; echo "HELLO"; > >>>echo ''; > >>> > >>> > >>> > >>>With Best Wishes > >>> > >>>Balwant Singh > >>> > >>>INDO ASIAN FUSEGEAR LTD. > >>>A-39, HOSIERY COMPLEX > >>>PHASE - II EXTN., NOIDA > >>>PH: +91 - 120 - 3048140 / 304 > >>>FAX: +91 - 120 - 2568 473 > >>>WEB : www.indoasian.com > >>> > >>> > >>> > >>> Original Message > >>>From: "Daryl Booth" <[EMAIL PROTECTED]> > >>>To: php-db@lists.php.net > >>>Subject: [PHP-DB] HTML Tables in PHP... > >>>Date: 9/25/2005 19:05 > >>> > How can I give a 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: > > > > > $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 cellpadding="0" cellspacing="0"> > > > > height="109" border="0" usemap="#Map"> > > > > > > height="394"> > > > > > > > > class="style3">$nachricht > > height="394" border="0" usemap="#Map2"> > > > > > > height="23"> > > > > ; > > } > > ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
There are many ways to do it. I prefer one of these two: EOB; ?> or. 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 ""; > > provides the convenience of inserting variables: > echo ""; > > 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 ''; >>>echo ''; echo "HELLO"; >>>echo ''; >>> >>> >>> >>>With Best Wishes >>> >>>Balwant Singh >>> >>>INDO ASIAN FUSEGEAR LTD. >>>A-39, HOSIERY COMPLEX >>>PHASE - II EXTN., NOIDA >>>PH: +91 - 120 - 3048140 / 304 >>>FAX: +91 - 120 - 2568 473 >>>WEB : www.indoasian.com >>> >>> >>> >>> Original Message >>>From: "Daryl Booth" <[EMAIL PROTECTED]> >>>To: php-db@lists.php.net >>>Subject: [PHP-DB] HTML Tables in PHP... >>>Date: 9/25/2005 19:05 >>> >>> How can I give a 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: >>> $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 >>>cellpadding="0" cellspacing="0"> >>>height="109" border="0" usemap="#Map"> >>>height="394"> >>>class="style3">$nachricht >>>height="394" border="0" usemap="#Map2"> >>>height="23"> ; } ?> > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
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 ""; provides the convenience of inserting variables: echo ""; 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 ''; > > echo ''; echo "HELLO"; > > echo ''; > > > > > > > > With Best Wishes > > > > Balwant Singh > > > > INDO ASIAN FUSEGEAR LTD. > > A-39, HOSIERY COMPLEX > > PHASE - II EXTN., NOIDA > > PH: +91 - 120 - 3048140 / 304 > > FAX: +91 - 120 - 2568 473 > > WEB : www.indoasian.com > > > > > > > > Original Message > > From: "Daryl Booth" <[EMAIL PROTECTED]> > > To: php-db@lists.php.net > > Subject: [PHP-DB] HTML Tables in PHP... > > Date: 9/25/2005 19:05 > > > > >How can I give a 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: > > > > > > > > > > > > > > > > >$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 > >cellpadding="0" cellspacing="0"> > > > > > > > > > > > > > >height="109" border="0" usemap="#Map"> > > > > > > > > > > > > > > > > > > > >height="394"> > > > > > > > > > > > > > > > > > > > > > > > > > >class="style3">$nachricht > > > > > > > >height="394" border="0" usemap="#Map2"> > > > > > > > > > > > > > > > > > > > >height="23"> > > > > > > > > > > > >; > > > > > >} > > > > > >?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
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 ''; > echo ''; echo "HELLO"; > echo ''; > > > > With Best Wishes > > Balwant Singh > > INDO ASIAN FUSEGEAR LTD. > A-39, HOSIERY COMPLEX > PHASE - II EXTN., NOIDA > PH: +91 - 120 - 3048140 / 304 > FAX: +91 - 120 - 2568 473 > WEB : www.indoasian.com > > > > Original Message > From: "Daryl Booth" <[EMAIL PROTECTED]> > To: php-db@lists.php.net > Subject: [PHP-DB] HTML Tables in PHP... > Date: 9/25/2005 19:05 > > >How can I give a 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: > > > > > > > > > > >$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 >cellpadding="0" cellspacing="0"> > > > > > > > > >height="109" border="0" usemap="#Map"> > > > > > > > > > > > > >height="394"> > > > > > > > > > > > > > > > > >class="style3">$nachricht > > > > >height="394" border="0" usemap="#Map2"> > > > > > > > > > > > > >height="23"> > > > > > > > >; > > > >} > > > >?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML Tables in PHP...
all html tags should be in single quote when used in php like echo ''; echo ''; echo "HELLO"; echo ''; With Best Wishes Balwant Singh INDO ASIAN FUSEGEAR LTD. A-39, HOSIERY COMPLEX PHASE - II EXTN., NOIDA PH: +91 - 120 - 3048140 / 304 FAX: +91 - 120 - 2568 473 WEB : www.indoasian.com Original Message From: "Daryl Booth" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] HTML Tables in PHP... Date: 9/25/2005 19:05 How can I give a 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: $nachricht ; } ?> -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] HTML Tables in PHP...
> How can I give a 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". Hi Daryl, Put double-quotes around the entire string, and use single-quotes around the table property values etc. Something similar to: echo " Some stuff "; Also, in the code you've posted you don't have a closing double-quote and semi-colon at the end of: > $nachricht="The licence doesn't exist please contact us! This probably should be: $nachricht="The licence doesn't exist please contact us!"; Much warmth, Murray --- "Lost in thought..." http://www.planetthoughtful.org -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML tables in PHP
You probably want something more like this (see modified code below). Note that if you get a lot of records, your html table will keep expanding out to the right. You might want to break it up with rows ... or not, as you like. There are quite a few places that have intros to php subjects. Check out the list at http://www.php.net/links.php -Steve "; while($row = mysql_fetch_array($ret)){ // note: indenting your code in loops makes it much easier to see what's going on :) $image = $row['image']; $name = $row['name']; $quantity = $row['quantity']; $display_block ="$name$quantity"; // show each record in its own cell here echo "$display_block"; } // finish up the table outside the loop echo ""; ?> On Wednesday, April 10, 2002, at 01:17 PM, Jennifer Downey wrote: > Hi everyone! > > Is there a good tutorial on how to write html tables in PHP? > > In my last post "Not displaying all records" I have the items displayig > all > the contents of the table but they are in descending order. > like this > item 1 > item 2 > > Here is the code I am using > > $query = "SELECT id, name, image, quantity FROM > {$config["prefix"]}_my_items > WHERE uid={$session["uid"]} ORDER BY id"; > $ret = mysql_query($query); > while($row = mysql_fetch_array($ret)){ > $image = $row['image']; > $name = $row['name']; > $quantity = $row['quantity']; > > $display_block =" src=$image>$name$quantity"; > echo "$display_block"; > echo""; > } > > > I have already tried this > > $display_block =" src=$image>$name$quantity"; > echo > "$display_block$display_block"; > echo""; > > But it displays 2 sets of all items still in descending order beside > each > other: > > item 1 item 1 > item 2 item 2 > > What I wnat is to display them > > item 1 item 2 item 3 > > Is there a way to do this? > > Thanks > Jennifer > > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] HTML tables in PHP
The way I do this is a very simple bit of code: Outside the "while" statement, add the line: $column = 1; Then, inside the "while" statement, take the statements out and instead do something like this: $column++; if ($column > 3) { echo ""; $column = 1; } This will render a new table row every time the counter reaches 3. You can change that number to make as many cells as you want before rendering a new table row. You will probably want to take the out of the "while" statement too, unless you really do want to make a new table for every record returned. Hope that helps. Good luck, Dan > Hi everyone! > > Is there a good tutorial on how to write html tables in PHP? > > In my last post "Not displaying all records" I have the items > displayig all the contents of the table but they are in descending order. > like this > item 1 > item 2 > > Here is the code I am using > > $query = "SELECT id, name, image, quantity FROM {$config["prefix"]}_my_items > WHERE uid={$session["uid"]} ORDER BY id"; > $ret = mysql_query($query); > while($row = mysql_fetch_array($ret)){ > $image = $row['image']; > $name = $row['name']; > $quantity = $row['quantity']; > > $display_block ="$name$quantity"; > echo "$display_block"; > echo""; > } > > I have already tried this > > $display_block ="$name$quantity"; > echo > "$display_block$display_block"; > echo""; > > But it displays 2 sets of all items still in descending order beside > each other: > > item 1 item 1 > item 2 item 2 > > What I wnat is to display them > > item 1 item 2 item 3 > > Is there a way to do this? > > Thanks > Jennifer > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php --- End of Forwarded Message --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php