The easiest way to remove the lines in the PHP files or in HTML files,
- Open the file
- Click CTRL + F
- Select "Current document" in "Find in" (You can also select the folder if you have multiple files)
- Search in "Source code"
- Tick "Use regular expression"
- Type "[rn]{2,}" (without quotes) in "Find"
- Type "n" (without quotes) in "Replace"
- Press "Replace All"
We can also replace the multiple line breaks through coding the coding is as below:
These are the two methods by which we can remove the extra lines.