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

2002-01-12 Thread Thomas Holton


The \n can be useful for when you want to look at the source code from an
HTML page. It will not make a new line within the browser, but it sure
can make reading the source alot easier... otherwise all of the code goes
onto the same line... which also can be useful if you want it be difficult
for others to take your source code!


..

On Sun, 13 Jan 2002, Dani wrote:

> 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 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  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 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
> > [EMAIL PROTECTED]
> > http://www.gianlucabaldo.com
> > http://www.phpauction.org
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2002-01-12 Thread Dani

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 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  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 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
> [EMAIL PROTECTED]
> http://www.gianlucabaldo.com
> http://www.phpauction.org


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2002-01-12 Thread Dennis Moore

I assume you your displaying a web page.  HTML ignores \n ... You need to
insert a .


- Original Message -
From: "Dani" <[EMAIL PROTECTED]>
To: "PHP LIST" <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 8:25 PM
Subject: [PHP] Please "\n" problem


> Hi!
>
> thanks for reviewing this email.
>
> I have wrote this script and I have checked it but for some reasons (I
> don't know what) it doesn't work.
>
> Could any body please check and give some feedback please?
>
> 
> include("heading.inc");
>
> echo "Result :\n";   ->>> THIS DOESN'T GIVE ME A
> NEW LINE- WHY ?
>
>
> //CONNECT TO SERVER
> include("connect.inc");
>
> //CONNECT DATABASE
> include("select_db.inc");
>
> $query = "select * from main_table where item_type = '$type' and class =
> '$class' ";
> $result = mysql_query($query);
>
> $row = mysql_fetch_array($result);
>
> echo ("$row[item_id]\n"); ->>>> THIS DOESN'T
> GIVE ME A NEW LINE EITHER, WHY ??
>
> while ($row = mysql_fetch_array($result))
>  {
>  echo "$row[item_type]" , "$row[class]";
>  }
>
> ?>
>
>
> Any reply is greatly appriciated
>
> Regards,
> Dani
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2002-01-12 Thread Gianluca Baldo

Dani -

D> echo "Result :\n";   ->>> THIS DOESN'T 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  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 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
[EMAIL PROTECTED]
http://www.gianlucabaldo.com
http://www.phpauction.org


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Please "\n" problem????

2002-01-12 Thread Dani

Hi!

thanks for reviewing this email.

I have wrote this script and I have checked it but for some reasons (I
don't know what) it doesn't work.

Could any body please check and give some feedback please?

>> THIS DOESN'T GIVE ME A
NEW LINE- WHY ?


//CONNECT TO SERVER
include("connect.inc");

//CONNECT DATABASE
include("select_db.inc");

$query = "select * from main_table where item_type = '$type' and class =
'$class' ";
$result = mysql_query($query);

$row = mysql_fetch_array($result);

echo ("$row[item_id]\n"); - THIS DOESN'T
GIVE ME A NEW LINE EITHER, WHY ??

while ($row = mysql_fetch_array($result))
 {
 echo "$row[item_type]" , "$row[class]";
 }

?>


Any reply is greatly appriciated

Regards,
Dani


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]