You are not logged in.

#1 2008-11-25 20:36:52

bz1pp3d
Member
Registered: 2008-11-25
Posts: 21

php parsing problem

Hello!I'm glad to be archlinux user.All run perfectly, except the php.I've followed the LAMP guide, all fine.I've got this problem:
when i write some scripts and want to insert new line .e.g  <?php print "something\n"; print "something2"; ?> there is no new line in the browser output.How can i fix this?10x

PS Sorry if there is a thread about this.

Offline

#2 2008-11-25 20:44:05

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: php parsing problem

print "something<br />"; print "something2"; ?>

The newline is reflected in the source if you view it through the browser, but a newline is just whitespace in (X)HTML.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#3 2008-11-25 21:15:14

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: php parsing problem

See above for the html-fix.  You can also do header("Content-type: text/plain"); if you want to serve plaintext.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB