阅读背景:

在PHP中,如何在多行上表示字符串文字,而不让新的行出现在呈现的文本中?

来源:互联网 

Sometimes in PHP when I need to assign a large string literal to a variable, I break the quoted string into multiple lines so it can be read without scrolling 300 characters to the right. My problem is that PHP includes the new-line in the actual string when it is rendered in the application. Is there any way to escape the new line or is there a better way of expressing a string literal on multiple lines? I'm aware that I could use concatenation, but I was hoping for a more elegant solution.Sometimes in PHP when I need to assign a large




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: