Hi,
i have installed LAMP and my sites are working fine.
i don't know how to use line break in linux. i have tried all the following choices but they do not work
\n
\r
\r\n
\n\r
i can only go to new line using html tag
(versionhp-5.1.6-20.el5_2.1)
any help would be thankful
line break in linux
Moderator: General Moderators
Re: line break in linux
Are you trying to do a newline on the page or within some kind of text formatting? I believe you're getting php confused with HTML or C++. The only way to do a formatted line break inside of php that will display on the page as an actual line break is to use HTML. <br/> or <p></p> tags.
The \n works with javascript, and it does work with php also, only you won't see the format change on the actual webpage. If you looked at the text (view source) you would see there were line breaks present, but again the only way to display those breaks to the user is to use HTML.
The \n works with javascript, and it does work with php also, only you won't see the format change on the actual webpage. If you looked at the text (view source) you would see there were line breaks present, but again the only way to display those breaks to the user is to use HTML.