2012年6月18日 星期一

php nl2br的反函式br2nl

nl2br的反函式br2nl


<?php defined('SYSPATH') or die('No direct script access.');
 class html extends html_Core {
 public static function br2nl($text) {    
  return preg_replace('/<br\\s*?\/??>/i', '', $text);   
 } 
}
四月 10, 2009 • Posted in: Kohana, PHP, 程式語言

沒有留言:

張貼留言