Ok, I hate regular expressions, everytime I try, it fails...
could someone tell me why this doesn't work???
<?php
require 'functies.php';
$str = "this is a teststring (smile) blablabl :d) blablabla 🙂";
$q = mysql_query("SELECT * FROM smileys ORDER BY categorie");
while($l = mysql_fetch_object($q))
{
$bericht = preg_replace("/".preg_quote($l->code,"/")."/i","<img src='".$l->url."'>",$str);
}
echo "<br><br>",$bericht;
?>
it doesn't generate an error,it just doesn't replace my smileys (the 3 used exist)