Easy as pie.
Firstly, make sure your TEXTAREA tab has the 'wrap' attribute set to 'hard'.
You can set the number of characters per line by using the 'cols' attribute.
So if you want to do a hard wrap every 75 characters, use .
Next, in your PHP script, run the text through nl2br() to add the ta
this is wrong:
> foreach ($lines as $line) {
> if (strlen($line) > $maxchars) {
> $newtext .= substr($line, 0, $maxchars)."\n";
> $newtext .= substr($line, $maxchars)."\n";
> }
> }
try this:
foreach ($lines as $line) {
if (strlen($line) > $maxchars) {
$newtext
forgot the " to ' conversion:
// this should do the job quite fine.
$var = str_replace ("\"", "'", $var);
Regards Michael
"Michael Virnstein" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you want to write into the database, i wouldn't convert newli
if you want to write into the database, i wouldn't convert newline to .
do this
when you read from the database using nl2br($var) ot convert every newline
in $var to .
default after 75 characters if no was found before.
if you don't care about word-splitting, you could do the following:
//INSER
4 matches
Mail list logo