Question : Delete blank line from textarea

Hello Experts,

How to delete blank lines (first, on top of the document, and last, on the end, but at first check, there are blank lines or not).

Thanks

Answer : Delete blank line from textarea

http://programming-oneliners.blogspot.com/2006/03/remove-blank-empty-lines-php-29.html

$blanksremoved = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['txtrareaname']);
Random Solutions  
 
programming4us programming4us