View Full Version : How to Do New Line In Source Code?

09-16-2009, 07:54 PM

Just a quick question,

Say i'm just doing a simple loop which in it outputs a bunch of <li></li>

Now this is fine, but say I go to view the page in my source code all the <li>'s are on the same line, is there a way I can get them to appear on a new line in the Source Code?

I just need it so I know what's going on when I view my page from the Source Code.

09-16-2009, 07:56 PM
Make a regular expression replace.
Replace the following:

with this:


Do not forget to use regular expression replace.

Another thing, it might be that your editor does not contain a regular expression search (notepad for example).

09-16-2009, 08:07 PM
like this for a new line;

like this for a tab and a new line;

this will help keep your source nicely formatted.

09-17-2009, 08:48 AM
..and keep in mind that you need to use double quotes for wrapping those special characters.