Citat:
Ursprungligen postat av Bladet
Kod:
echo preg_replace ('/\<code\>(.*?)\<\/code\>/isxe', "'<pre class=\"code\">'.htmlentities('$1').'</pre>'", $content);
Glöm inte pattern-modifiern /e (PREG_REPLACE_EVAL).
|
Hmm, vad gör EVAL? Låter den dig ha php kod i replace-taggen?