Re: newbe question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andres,

I'm also new to this mailing list.

The echo function does not insert a \n at the end of the line. Try removing the extra space after the ?>


__
Raymond Irving
Create Rich PHP Web Apps Today!
Raxan PDI - http://raxanpdi.com/



--- On Wed, 3/25/09, Andres Gonzalez <andres@xxxxxxxxxxxxxxx> wrote:

From: Andres Gonzalez <andres@xxxxxxxxxxxxxxx>
Subject:  newbe question
To: php-general@xxxxxxxxxxxxx
Date: Wednesday, March 25, 2009, 11:28 AM

Hi,

I want to learn PHP so I started using it for all of my general purpose scripts. The general format of my scripts are like this:

#!/usr/bin/php
<?php

.....bla bla bla  PHP code

?>

When I run my scripts and I have an echo (or print) at the end of the script to print out the results of the script, I get an extra line feed printed out. It seems that I can use this:

echo " bla bla bla with no terminating line feed";

and I will not get a line feed. But when I use the echo at the end of the script I get a terminating line feed. Is this correct or am I misinterpreting this?

Does echo and print always terminate the string with a \n ?
The function manual does not seem to mention anything about this.

thanks,

-Andres



-- PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux