Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Parsing PHP Better?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33721
    stevendeeds
    Member

    I’m pretty sure the answer is NO, but, I was wondering if there is anyway to control where line breaks are in the outputted html php sends? If I echo through a loop I end up getting really hard to read html on output. Is there anyway to add line breaks after a function is complete?

    Silly question I know, but it really does irritate me sometimes. lol.

    #84268
    ddliu
    Member

    @stevendeeds, It’s all under your control.

    echo “something”, it’s just what it means, will output “something” **without line break**, PHP will not add line breaks for you.

    echo “somethingn”, you will have “somethingLINEBREAK”.

    You can write a simple function to wrap it, but I don’t think it’s necessary:


    function print_line($text){
    echo $text."n";
    //or echo $text.PHP_EOL;
    }
    #84273
    stevendeeds
    Member

    awesome. thanks guys

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.