Skip to main content
gamedev.net
🔒 Locked

php print / printf

Started by Gammastrahler 1 reply 300+ views
Original Post
Gammastrahler
Gammastrahler
hi, i have recently installed XAMPP (Apache/PHP/MySQL) php scripts work, but there is one problem: print ("hello \n world") as well as printf ("hello \n world") should produce a line break, but it doesn´t do! The "\n" is ignored! what´s wrong here?? would be nice if someone could help! thanks Gammastrahler
mars_888
mars_888
Usually PHP output is read through a browser which doesn't support line breaks. Try using either '<pre>hello \n world</pre>' or 'hello <br> world'.


[edited by - mars_888 on January 9, 2004 7:19:46 PM]
Prosser: But the plans were on display.Arthur Dent: On display? I eventually had to go down to the cellar.Prosser: That's the display department.Arthur Dent: With a torch.Prosser: The lights had probably gone.Arthur Dent: So had the stairs.Prosser: But you did see the notice, didn't you?Arthur Dent: Oh, yes. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign outside the door saying "Beware of the Leopard." Ever thought of going into advertising?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.