immanuelx2 Posted June 28, 2009 Share Posted June 28, 2009 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! Quote Link to comment Share on other sites More sharing options...
dzelenika Posted June 28, 2009 Share Posted June 28, 2009 what about trim() Quote Link to comment Share on other sites More sharing options...
immanuelx2 Posted June 29, 2009 Author Share Posted June 29, 2009 what about trim() what a great idea!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.