Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为我的条形图设置多行标签。我一直在使用str_replace()将所有空格替换为\r\n or \n但没有一个有效。标签没有分成多行。
str_replace()
\r\n or \n
有谁知道如何使它正确?
好的,我已经解决了,只是一些语法错误。
代替str_replace(' ', '\n', str)
str_replace(' ', '\n', str)
我应该使用str_replace(' ', "\n", str)
str_replace(' ', "\n", str)