Hallo kann mir einer sagen wie die richtige Syntax ist.
$text = "hallo wie geht es dir [img]ID=3[/img] hoffendlich gut";
$text = preg_replace('[img]','<a href="',$text,1);
$text = preg_replace('ID='.$fs,$destination_file,$text,1);
$text = preg_replace('[\img]','">'>",$text,1);