Link to home
Start Free TrialLog in
Avatar of Mr_Splash
Mr_Splash

asked on

Adding line breaks to code

I'm having trouble producing code that can be easily read by humans in a browsers 'view source'

The code below looks like this in view source;

Line 0<br />Line 1<br />Line 2<br />Line 3<br />Line 4<br />

However I would like view source to look like this (without changing the rendered version of the page);
Line 0<br />
Line 1<br />
Line 2<br />
Line 3<br />
Line 4<br />

Can this be done?
for ($x = 0; $x < 5; $x++) {
  echo 'Line '.$x.'<br />';
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial