Re: line feed

From: Date: Sat, 05 Mar 2005 04:39:22 +0000
Subject: Re: line feed
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-210063@lists.php.net to get a copy of this message
Hi, Saturday, March 5, 2005, 12:38:20 AM, you wrote: BS> Hello. BS> How do i print a line return using the echo command, for when i see the BS> page source, BS> i get the code line by line and not all in the same line. BS> using double quotes ( " ), i can put \n at the end and i get the result BS> i want, BS> but, using sinle quotes ( ' ), \n doesnt work. BS> if i use double quotes, in a simple html comand i need to use \" and i BS> dont want that. BS> is any way i could use single quotes, and getting the line feed ?? BS> example: BS> Double quotes: BS> echo "<table border=\"1\" width=\"800px\">\n"; BS> single quotes: BS> echo '<table border="1" width="800px">'; BS> cheers BS> Bruno Santos BS> -- BS> Say no to software patents BS> www.nosoftwarepatents.com/ BS> -- BS> bvsantos@hal.min-saude.pt BS> -- BS> Divisao de Informatica BS> informatica@hal.min-saude.pt BS> Tel: +351 272 000 155 BS> Fax: +351 272 000 257 BS> -- BS> Hospital Amato Lusitano BS> geral@hal.min-saude.pt BS> Tel: +351 272 000 272 BS> Fax: +351 272 000 257 you could do: define('LF',"\n"); echo '<table border="1">'.LF; -- regards, Tom

« previous php.general (#210063) next »