RE: [PHP] While and echoing HTML

2005-05-10 Thread Jared Williams
> > I guess it is the missing semicolon. > > > And you can write: > > echo "" > > as simply > > echo "$product_type" > I prefer echo '', $product_type, ''; No string concatenation, or variable replacement required. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] While and echoing HTML

2005-05-10 Thread Burhan Khalid
Mary-Anne Nayler wrote: Hi Mark, As far as I can see the only problem is that you have forgotten to add a semicolon after the i++ Mark: Since you are not displaying the counter, you really don't need to mess with $i. You can reduce your code to just : $db = mysql_connect("localhost", "r

Re: [PHP] While and echoing HTML

2005-05-10 Thread Richard Lynch
On Mon, May 9, 2005 10:57 pm, Mark Sargent said: > Thanx. I saw the extra echo and removed it. Problem with that code, > though. It displays only the 1st record, repeatedly, causing the browser > to hang. Can anyone see what is wrong..? Cheers. Everybody else has told you to move the $i++; inside

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mark Sargent
Mary-Anne Nayler wrote: oh, and the i++ should be inside the while loop and there is also a missing semi colon after the echo, ie; $i=0; while ($i < $num){ $product_type=mysql_result($result,$i,"product_type_detail"); echo ""; $i++ ; } Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page,

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mary-Anne Nayler
Hi Mark, As far as I can see the only problem is that you have forgotten to add a semicolon after the i++ Cheers, Mary-Anne Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page, http://www.freewebmasterhelp.com/tutorials/phpmysql/5 has the below code, $first=mysql_result($result,$i,"fir

Re: [PHP] While and echoing HTML

2005-05-10 Thread darren kirby
quoth the Mark Sargent: > > > Jumbo Status > $db = mysql_connect("localhost", "root", "grunger"); > mysql_select_db("status",$db); > $result = mysql_query("SELECT ProductTypes.product_type_detail FROM > ProductTypes",$db); > $myrow = mysql_fetch_array($result); > $num = mysql_num_rows($result);

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mary-Anne Nayler
oh, and the i++ should be inside the while loop and there is also a missing semi colon after the echo, ie; $i=0; while ($i < $num){ $product_type=mysql_result($result,$i,"product_type_detail"); echo ""; $i++ ; } Mark Sargent wrote, On 10/05/05 02:23 PM: Hi All, this page, http://www.freewebmaster

Re: [PHP] While and echoing HTML

2005-05-10 Thread Mark Sargent
Prathaban Mookiah wrote: I guess it is the missing semicolon. And you can write: echo "" as simply echo "$product_type" Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tue, 10 May 2005 13:23:51 +0900 Subject: [PHP] While and

Re: [PHP] While and echoing HTML

2005-05-09 Thread =?iso-8859-1?q?Fabian_M=FCller?=
Mark Sargent <[EMAIL PROTECTED]> writes: > $i=0; > while ($i < $num){ > $product_type=mysql_result($result,$i,"product_type_detail"); > echo "" > } > $i++ You should put "$i++" into the while loop. And you should add an ";" at the end of the echo line as well as at the end of "$i++". With kind r

Re: [PHP] While and echoing HTML

2005-05-09 Thread Prathaban Mookiah
I guess it is the missing semicolon. And you can write: echo "" as simply echo "$product_type" Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tue, 10 May 2005 13:23:51 +0900 Subject: [PHP] While and echoing HTML >