...

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



stfc_boy
10-31-2007, 04: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';


Thanks

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

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

Any further ideas?

Mwnciau
10-31-2007, 05: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