Jump to content

Newbish question


Stickybomb

Recommended Posts

Hi i have been using php for several monsths now and I think it rocks.

how ever i was wondering when your echoing html with php how you can get it to display it cleaner like tab and organized like it was coded that way. I tried using the /n new line but it just displays the text? ???

can some on please help me with this thxs  :)
Link to comment
https://forums.phpfreaks.com/topic/35927-newbish-question/
Share on other sites

no i know the whole /n new line code, sorry if I was unclear I was wondering if there was another way of doing the same sort of thing. the /n does not always work in every situation, and i tend to be very neat and picky when it comes to my code so I am looking for the most control over how it outputs it.
Link to comment
https://forums.phpfreaks.com/topic/35927-newbish-question/#findComment-170395
Share on other sites

The \n not /n does work when within double quotes. I'm a little lost as to what your question really is. Are you asking how to make newlines in html source or in html output? A new line in html is <br /> as jesirose pointed out. Otherwise, you'll need to explain your question better.
Link to comment
https://forums.phpfreaks.com/topic/35927-newbish-question/#findComment-170396
Share on other sites

I think what he means is when you are looking at the webpage through the browser, and you right-click > view source, the html source code is all tidy and indented, etc.. instead of all just one line or something.

As in, when you dynamically create html with php, how to include the "tidiness."
Link to comment
https://forums.phpfreaks.com/topic/35927-newbish-question/#findComment-170399
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.