function my_tags($text = null) { $text = preg_replace('/\[b\](.*?)\[\/b\]/s', '$1', $text); $text = preg_replace('/\[i\](.*?)\[\/i\]/s', '$1', $text); $text = preg_replace('/\[u\](.*?)\[\/u\]/s', '$1', $text); $text = preg_replace('/\[ul\]/s', '', $text); $text = preg_replace('/\[li\](.*?)\[\/li\]/s', '
  • $1
  • ', $text); $text = preg_replace('/\[h1\](.*?)\[\/h1\]/s', '

    $1

    ', $text); $text = preg_replace('/\[h2\](.*?)\[\/h2\]/s', '

    $1

    ', $text); $text = preg_replace('/\[h3\](.*?)\[\/h3\]/s', '

    $1

    ', $text); $text = preg_replace('/\[center\](.*?)\[\/center\]/s', '
    $1
    ', $text); $text = preg_replace('/\[left\](.*?)\[\/left\]/s', '
    $1
    ', $text); $text = preg_replace('/\[right\](.*?)\[\/right\]/s', '
    $1
    ', $text); $text = preg_replace('/\[blockquote\](.*?)\[\/blockquote\]/s', '
    $1
    ', $text); $text = preg_replace('/\[url=(.*?)\](.*?)\[\/url\]/s', '$2', $text); $text = preg_replace('/\[img\](.*?)\[\/img\]/s', '', $text); $text = preg_replace('/\[\^\](.*?)\[\/\^\]/s', '
    $1
    ', $text); return $text; }