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