C语言 c++ php mysql nginx linux lnmp lamp lanmp memcache redis 面试 笔记 ppt 设计模式 问题 远程连接

  2012年10月12日
摘要: //php 有三种方法来解决 //1、使用str_replace 来替换换行 $str = str_replace(array("\r\n", "\r", "\n"), "", $str); //2、使用正则替换 $str = preg_replace('//s*/', '', $str); //3、使用php定义好的变量 (建议使用) $str = str_replace(PHP_EOL, '', $str);// 转为前台可显示的换行, nl2br 的方向函数参考 阅读全文
posted @ 2012-10-12 01:21 思齐_ 阅读(23278) 评论(0) 推荐(0) 编辑