[PHP] Line feed in a echo

2005-04-26 Thread Mario de Frutos Dieguez
How can i make a line feed in a echo instruction? like printf(foo\n);
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones  

CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Line feed in a echo

2005-04-26 Thread Andri Heryandi
Use echo something br;
is that what you mean?
Mario de Frutos Dieguez wrote:
How can i make a line feed in a echo instruction? like printf(foo\n);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Line feed in a echo

2005-04-26 Thread Chris Ramsay
Like echo foo\n

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Ken
On 4/26/05, Andri Heryandi [EMAIL PROTECTED] wrote:
 Use echo something br;
 
 is that what you mean?
 
 
 Mario de Frutos Dieguez wrote:
 
  How can i make a line feed in a echo instruction? like printf(foo\n);
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

you can do it by using echo as well:

echo This is a line feed\n;
or a carriage return
echo this is a carriage return\r;

check out http://www.php.net/strings

Hope this helps

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Ken
On 4/26/05, Ken [EMAIL PROTECTED] wrote:
 On 4/26/05, Andri Heryandi [EMAIL PROTECTED] wrote:
  Use echo something br;
 
  is that what you mean?
 
 
  Mario de Frutos Dieguez wrote:
 
   How can i make a line feed in a echo instruction? like printf(foo\n);
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 you can do it by using echo as well:
 
 echo This is a line feed\n;
 or a carriage return
 echo this is a carriage return\r;
 
 check out http://www.php.net/strings
 
 Hope this helps
 

i meant this URI:
http://se2.php.net/manual/en/language.types.string.php

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Mario de Frutos Dieguez
Andri Heryandi escribió:
Use echo something br;
is that what you mean?
Mario de Frutos Dieguez wrote:
How can i make a line feed in a echo instruction? like printf(foo\n);

yes that's it thx
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones  

CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Line feed in a echo

2005-04-26 Thread Ken
On 4/26/05, Mario de Frutos Dieguez [EMAIL PROTECTED] wrote:
 Andri Heryandi escribió:
 
  Use echo something br;
 
  is that what you mean?
 
 
  Mario de Frutos Dieguez wrote:
 
  How can i make a line feed in a echo instruction? like printf(foo\n);
 
 
 yes that's it thx
 
 --
 Mario de Frutos Dieguez
 
 División de Ingeniería del Software
 y Comunicaciones
 
 CARTIF -Parque Tecnológico Boecillo
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

in that case i suggest using br / instead as that is valid xhtml 1.0.

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread M. Sokolewicz
Ken wrote:
On 4/26/05, Mario de Frutos Dieguez [EMAIL PROTECTED] wrote:
Andri Heryandi escribió:

Use echo something br;
is that what you mean?
Mario de Frutos Dieguez wrote:

How can i make a line feed in a echo instruction? like printf(foo\n);

yes that's it thx
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones
CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


in that case i suggest using br / instead as that is valid xhtml 1.0.
that would depend on the DTD header you provide. If you provide an HTML 
= 4.01 line, then br / is syntactically incorrect. However, when 
using XHTML 1.0+ or XML, it's correct.

Remember that the internal closing of a tag is something that is an 
add-on to SGML, and part of XML. Since HTML is derived from SGML, and 
not XML it doesn't have that ability natively; as for XHTML, which is 
based on both, it's possible to use it; and advised obviously ;)

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


[PHP] line feed

2005-03-04 Thread Bruno Santos
Hello.
How do i print a line return using the echo command, for when i see the 
page source,
i get the code line by line and not all in the same line.

using double quotes (  ), i can put \n at the end and i get the result 
i want,
but, using sinle quotes ( ' ), \n doesnt work.

if i use double quotes, in a simple html comand i need to use \  and i 
dont want that.

is any way i could use single quotes, and getting the line feed ??
example:
Double quotes:
   echo table border=\1\ width=\800px\\n;
single quotes:
   echo 'table border=1 width=800px';
cheers
Bruno Santos
--
Say no to software patents
www.nosoftwarepatents.com/
--
[EMAIL PROTECTED]
--
Divisao de Informatica
[EMAIL PROTECTED]
Tel: +351 272 000 155
Fax: +351 272 000 257
--
Hospital Amato Lusitano
[EMAIL PROTECTED]
Tel: +351 272 000 272
Fax: +351 272 000 257
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] line feed

2005-03-04 Thread Jason Petersen
On Fri, 04 Mar 2005 14:38:20 +, Bruno Santos
[EMAIL PROTECTED] wrote:
 Hello.
 
 How do i print a line return using the echo command, for when i see the
 page source,
 i get the code line by line and not all in the same line.
 
 using double quotes (  ), i can put \n at the end and i get the result
 i want,
 but, using sinle quotes ( ' ), \n doesnt work.

Maybe you could use the HEREDOC format?

echo END
table border=0 width=100%
  trtdsome table stuff/td/tr
/table

END;

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



Re: [PHP] line feed

2005-03-04 Thread tg-php
echo 'table border=1 width=800px' . chr(10);

chr(10) should be line feed and chr(13) is a carriage return (aka \r).  
Unless I got those mixed up.  But yes, you can do that.

Or you could even cheat and do:

echo 'table border=1 width=800px' . \n;

-TG

= = = Original message = = =

Double quotes:
echo table border=\1\ width=\800px\\n;

single quotes:
echo 'table border=1 width=800px';


cheers

Bruno Santos


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



Re: [PHP] line feed

2005-03-04 Thread Richard Lynch
Bruno Santos wrote:
 How do i print a line return using the echo command, for when i see the
 page source,
 i get the code line by line and not all in the same line.

 using double quotes (  ), i can put \n at the end and i get the result
 i want,
 but, using sinle quotes ( ' ), \n doesnt work.

 if i use double quotes, in a simple html comand i need to use \  and i
 dont want that.

 is any way i could use single quotes, and getting the line feed ??
 example:
 Double quotes:
 echo table border=\1\ width=\800px\\n;

 single quotes:
 echo 'table border=1 width=800px';

It's horrible code, but:

echo 'table border=1 width=800px
';

is also syntactically correct and it will work...

I *THINK* '...{chr(10)}' might also work in PHP4 and beyond...

But {} might be only inside  [shrug]

If I want \n I just use  myself...

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] line feed

2005-03-04 Thread Tom Rogers
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 [EMAIL PROTECTED]
BS --
BS Divisao de Informatica
BS [EMAIL PROTECTED]
BS Tel: +351 272 000 155
BS Fax: +351 272 000 257
BS --
BS Hospital Amato Lusitano
BS [EMAIL PROTECTED]
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

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