Have I misunderstood what heredoc should do?

后端 未结 4 1007
小鲜肉
小鲜肉 2021-01-20 13:03

I\'m very new to PHP so I know I am missing something obvious here - I thought the heredoc function is supposed to retain formatting, line breaks, etc. But whenever I test

4条回答
  •  伪装坚强ぢ
    2021-01-20 13:46

    It does, but only for what it outputs.

    If it outputs HTML, then that HTML is going to be interpreted by a browser using the normal rules for handling whitespace.

提交回复
热议问题