Merhaba arkadaslar

Buradaki kullanilan HTML to BBCODE function'da, linkleri düz yazi olarak gösteriyor ve resimleri hic almiyor sizce sorun ne olabilir ?

	function bb2html($text) { 
	  $bbcode = array("<", ">", 
					"[LIST]", "[*]", "[/LIST]",  
					"[IMG]", "[/IMG]",  
					"[B]", "[/B]",  
					"[U]", "[/U]",  
					"[I]", "[/I]", 
					'[COLOR="', "[/COLOR]", 
					"[SIZE=\"", "[/SIZE]", 
					'[URL="', "[/URL]", 
					"[MAIL=\"", "[/MAIL]", 
					"[CODE]", "[/CODE]", 
					"[QUOTE]", "[/QUOTE]", 
					'"]'); 
	  $htmlcode = array("<", ">", 
					"<ul>", "<li>", "</ul>",  
					"<img src=\"", "\">",  
					"<b>", "</b>",  
					"<u>", "</u>",  
					"<i>", "</i>", 
					"<span style=\"color:", "</span>", 
					"<span style=\"font-size:", "</span>", 
					'<a href="', "</a>", 
					"<a href=\"mailto:", "</a>", 
					"<code>", "</code>", 
					"<table width=100% bgcolor=lightgray><tr><td bgcolor=white>", "</td></tr></table>", 
					'">'); 
	  $newtext = str_replace($bbcode, $htmlcode, $text); 
	  $newtext = str_replace('<br />'," \r\n ",$newtext);
	  $newtext = str_replace('<br/>'," \r\n ",$newtext);
	  $newtext = str_replace('<br>'," \r\n ",$newtext);
	  $newtext = str_replace('<BR>'," \r\n ",$newtext);
	 // $newtext = nl2br($newtext);//second 
	    
	  return $newtext; 
	}
Simdiden tesekkürler.