Jump to content

[SOLVED] Removing \n if it is the last thing in a text area?


immanuelx2

Recommended Posts

Hey guys,

 

I have a form that is being processed via $_POST variables and was wondering if there is a regexp way of removing a newline char (\n) if it is the very last thing that was inside a textarea.

 

Also, any idea why this isn't working?

<?php
$comment = str_replace("[/quote]\n","[/quote]",$comment);
?>

 

Thanks in advance!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.