<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); if ( ! function_exists('bbcode')) { function bbcode($str = '') { $ci =& get_instance(); $ci->load->helper('url'); $str = $ci->security->xss_clean($str); $str = strip_tags($str, ''); $str = auto_link($str); $str = nl2br($str); $find = array( "~\[b\](.*?)\[/b\]~is", "~\[i\](.*?)\[/i\]~is"); $replace = array( '\\1', '\\1'); return preg_replace($find, $replace, $str); } }
Features **** Bold [i][/i] Italic http://url/ Url Image \n New lines!
Improve :)
There was an error while loading. Please reload this page.