在 PHP 中使用换行符分解数据库内容不会创建数组
我在数据库中存储了一些带有换行符的值。
想要将这些内容转换为数组,我这样做了:
$arr = explode($rs[data],"\n");
不幸的是,这不起作用。关于出了什么问题有什么想法吗?
I've stored some values in my database which have linebreaks.
Wanting to transform those contents into an array, I did it like this:
$arr = explode($rs[data],"\n");
Unfortunately this doesn't work. Any ideas as to what's wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
explode()
调用的参数是inverted :所以,你应该使用:
The parameters of your
explode()
call are inverted :So, you should use :
您传递的参数错误,请尝试上面的操作
You are passing parameters wrongly try above