|
Posted by Tom Rogers on 03/05/05 06:39
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
[Back to original message]
|