我有一份读到档案(档案_get_contents)。 我想用新路线取代所有新路线,并排除所有其他特征。 然而,在将内容解释成单字母变量时,我正遇到一个错误。
我认为,有罪的一方是“亚美尼亚”的特性,但我不知道如何去除。 “生态学”是一种特质,我认为“生态学”实际上属于扼杀本身。
我如何把这种特性从在营地中抹去?
奥凯以前我的问题是错误的,因此,我用新的内容更新了这个问题。
How do I ensure that all newlines are removed from a php string? This string is read in with file_get_contents, then javascript is dynamically created with the contents of the file. The " " is replaced with "NEW," and the " " is replaced with "".
However, I am getting an "Unexpected EOF" error, and when I copy the string and paste it into the console, something is giving me newlines. How do I make sure that ALL newlines (whitespace for that matter) is trimmed out?
trim()
str_replace
preg_replace
不管怎样使用,都非常赞赏任何帮助!