PHP Simple way to replace or remove empty lines with str_replace

2LoalayPlosaug

New Member
\[code\]$line-out = str_replace('\r', '', str_replace('\n', '', $line-in));\[/code\]The above works for me but, I saw a [\n\r] example somewhere and I cannot seem to find it.I just want to get rid any blank lines. The above is in a foreach loop.Thanks for teaching.
 
Back
Top