Re: [PHP] Wrapping text output

2003-03-21 Thread Justin French
on 22/03/03 3:57 PM, Philip J. Newman ([EMAIL PROTECTED]) wrote:

> $my_data = "This is a really long string that could go on for ever and ever
> and ever and ever and ever and ever and ever and ever and ever and ever and
> ever and ever and ever and don't wrap to my table it makes it bigger";
> 
> echo $my_data;
> 
> How can I make this wrap to the table?

Er:





This text will wrap inside a table, according to every browser I've ever
used.

If you want to wrap for other purposes, eg email or raw text, then

$my_data = wordwrap($my_data,65);

will word-wrap at 65 characters, which is pretty pointless with variable
width fonts, but okay with fixed width fonts.


Justin


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



Re: [PHP] Wrapping text output

2003-03-21 Thread Sebastian
$my_data = wordwrap( $my_data, 50 );
http://www.php.net/manual/en/function.wordwrap.php

it'll wrap after 50 charcters... change "50" to what you want it to start
wrapping at. If $my_data is inside a  it should wrap the text
automatically unless you tell the table not to wrap ..

cheers,
- Sebastian

- Original Message -
From: "Philip J. Newman" <[EMAIL PROTECTED]>


| $my_data = "This is a really long string that could go on for ever and
ever
| and ever and ever and ever and ever and ever and ever and ever and ever
and
| ever and ever and ever and don't wrap to my table it makes it bigger";
|
| echo $my_data;
|
| How can I make this wrap to the table?
|
|
| --
| Philip J. Newman.
| Head Developer
| [EMAIL PROTECTED]
|
|
|
| --
| 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



[PHP] Wrapping text output

2003-03-21 Thread Philip J. Newman
$my_data = "This is a really long string that could go on for ever and ever
and ever and ever and ever and ever and ever and ever and ever and ever and
ever and ever and ever and don't wrap to my table it makes it bigger";

echo $my_data;

How can I make this wrap to the table?


--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]



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