Hi
I have a problem, I have two functions tagi() and ObrobkaTekstu. I have not idea how using function tagi in preg_replace in function ObrobkaTekstu().
I tried this:Code:function tagi($x) { $x=str_replace('<','<',$x); $x=str_replace('>','>',$x); return $x; } function ObrobkaTekstu($tekst_do_obrobki) { $tekst_do_obrobki=preg_replace('{\[code\](.*?)\[/code\]}s','<pre>$1</pre>',$tekst_do_obrobki); //.... return $tekst_do_obrobki; }
of course this code dosnt work.Code:$tekst_do_obrobki=preg_replace('{\[code\](.*?)\[/code\]}s','<pre>'.tagi('$1').'</pre>',$tekst_do_obrobki);
Who has idea?


Reply With Quote


Bookmarks