Re: Please "\n" problem????
| From: | Gianluca Baldo | Date: | Sat, 12 Jan 2002 22:42:25 +0000 |
| Subject: | Re: Please "\n" problem???? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80315@lists.php.net to get a copy of this message | ||
Dani -
D> echo "Result :\n"; ------------------------->>> THIS DOESN'T GIVE ME
D> 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