View Full Version : An easy question - new lines in code

10-31-2007, 03:41 PM
Hi Guys,

I'm sure this is very easy, but it's been driving me mental for ages! In php how do you return a new line in your code. I know it's /n but I can't seem to get it working at all!!

echo '<div class="one"></div>/n';


10-31-2007, 03:43 PM
lol if memory serves me correct its \n not /n

10-31-2007, 03:59 PM
Yep, that's what I meant to write (lol) but that's not working (which is what I meant!! ;-)

Any further ideas?

10-31-2007, 04:07 PM
It has to be in double quotes:

echo "<div class=\"one\"></div>\n";
// or
echo '<div class="one"></div>' . "\n";

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum