Taking out "return" character

Hi,

I have a string ($message) being taken in from a text area in my html document, it is then supposed to be written to a file.

This would be simple, but I want one extra thing to be done; I want to get rid of the return character and replace it with "
", how would I do this?

Comments

  • You could use the chop() function:

    $var = chop($var);

    and this will chop of any trailing characters

    : Hi,
    :
    : I have a string ($message) being taken in from a text area in my html document, it is then supposed to be written to a file.
    :
    : This would be simple, but I want one extra thing to be done; I want to get rid of the return character and replace it with "", how would I do this?
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion