<?php
function smiles($msg){
$q=mysql_query("SELECT * FROM `smiles_spis`");
while($post = mysql_fetch_array($q)){
$msg = str_replace($post['sim'], '<img src="/users/smiles/images/'.$post['name'].'.gif" alt="'.$post['name'].'"/>', $msg);
}
return $msg;
}
?>