Re: newbe question
| From: | Andres Gonzalez | Date: | Wed, 25 Mar 2009 15:34:13 +0000 |
| Subject: | Re: newbe question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290679@lists.php.net to get a copy of this message | ||
I just figured this out.
It all depends on what is AFTER the last ?> tag.
If I do not have extra line feeds they are not printed.
Wow...
thanks,
-Andres
Andres Gonzalez wrote:
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