Re: continue [PHP] Please "\n" problem????

From: Date: Sun, 13 Jan 2002 01:35:46 +0000
Subject: Re: continue [PHP] Please "\n" problem????
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-80317@lists.php.net to get a copy of this message
Thanks Alot Guys!!!!!!! It works! now my next question is : When do I actually use "\n"??? Thank you so much! Gianluca Baldo wrote: > Dani - > > D> echo "Result :\n"; ------------------------->>> THIS DOESN'T > D> GIVE ME A > D> NEW LINE- WHY ????? > If you look at the source code of your page you'll see a new line > there. > If you want a new line in the browser output, you must place a <BR> at > that point, not a \n since it's HTML. > > Hope this helps. > Gianluca > > D> //CONNECT TO SERVER > D> include("connect.inc"); > > D> //CONNECT DATABASE > D> include("select_db.inc"); > > D> $query = "select * from main_table where item_type = '$type' and class = > D> '$class' "; > D> $result = mysql_query($query); > > D> $row = mysql_fetch_array($result); > > D> echo ("$row[item_id]\n"); ------------------------->>>> THIS > D> DOESN'T > D> GIVE ME A NEW LINE EITHER, WHY ?????? > > D> while ($row = mysql_fetch_array($result)) > D> { > D> echo "$row[item_type]" , "$row[class]"; > D> } > > ?>> > > D> Any reply is greatly appriciated > > D> Regards, > D> Dani > > -- > ALBASOFTWARE > C/ Mallorca 186 - 3º 1ª > 08036 Barcelona (Spain) > Tel./Fax +34 934549324 > webmaster@phpauction.org > http://www.gianlucabaldo.com > http://www.phpauction.org

« previous php.general (#80317) next »