This might work.  Untested.

$tokens = explode(" ", $message);

$num_tokens = count($tokens);

for ($i = 0; $i < $num_tokens; $i++) {
    $new_message .= $token . " ";
}

$new_message = rtrim($new_message);

echo $new_message;

Regards,
Paul Meagher

----- Original Message -----
From: "Ben Gillam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 12:52 PM
Subject: [PHP-WIN] Get the contents of the textarea "as is"


> For example, if someone puts the following into a textbox..
>
> "Hi my name is bob smith
>
> and im talking to you now
>
> and hitting enter every now and then"
>
> and the name of the textbox is $message
>
> how could i get it to take the contents of the text box and put it in
> $message as is, with blank lines and carrige returns that the user has
put
> in, becuase as you know that would just come out as
>
> "Hi my name is bob smith and im talking to you now and hitting enter
every
> now and then"
>
> Any help would be great.
> [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to