= 3) { $end = func_get_arg(2); return join("",array_slice($ar[0],$start_p,$len_p)); }else { return join("",array_slice($ar[0],$start_p)); } } $n=1; function bbcode2html($message) { $preg = array( '/(? "\\2", '/(? "\\2", '/(? "\\2", '/(? "
\\2
", '/(? "\\1", '/(? "\\1", '/(? "\\1", '/(? "
\\1
", // [email] '/(? "\\1", '/(? "\\2", // [url] '/(? "\\1", '/(? "\\1", '/(? "\\2", // [img] '/(? "\"\\1\"", '/(? "\"\\3\"", // [list] '/(?\s*)?\[\*(?::\w+)?\](.*?)(?=(?:\s*\s*)?\[\*|(?:\s*\s*)?\[\/?list)/si' => "\n
  • \\1
  • ", '/(?\s*)?\[\/list(:(?!u|o)\w+)?\](?:)?/si' => "\n", '/(?\s*)?\[\/list:u(:\w+)?\](?:)?/si' => "\n", '/(?\s*)?\[\/list:o(:\w+)?\](?:)?/si' => "\n", '/(?\s*)?\[list(:(?!u|o)\w+)?\]\s*(?:)?/si' => "\n