How to add extra whitespace in PHP?

后端 未结 14 2028
生来不讨喜
生来不讨喜 2020-12-02 22:44

I was wondering how can I add extra whitespace in php is it something like \\s please help thanks.

Is there a tutorial that list these kind of things th

14条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 23:13

    you can use the

     tag to prevent multiple spaces and linebreaks from being collapsed into one. Or you could use   for a typical space (non-breaking space) and 
    (or
    ) for line breaks.

    But don't do



    just use a

    tag and adjust the margins with CSS.

    Some copy...

    Although, you should define the styles globally, and not inline as I have done in this example.

    When you are outputting strings from PHP you can use "\n" for a new line, and "\t" for a tab.

    
    

    Although, flags like \n or \t only work in double quotes (") not single wuotes (').

提交回复
热议问题