usertest usertest - 2 months ago 5
PHP Question

Remove line from end of file with PHP

How would I remove a line from the end of a string with PHP? Thanks.

Answer

You want to remove whitespace? Try trim(). It's close cousins ltrim and rtrim may be closer to what you want.