<?php
# Смайлы
function smiles($msg)
{
$smiles = mysql_query("SELECT `zamena`, `name` FROM `smiles`");
while($row = mysql_fetch_array($smiles))
{
$explode = explode('|', $row['zamena']);
$msg = str_replace($explode,' <img src="/style/smiles/'. htmlentities($row['name'], ENT_QUOTES, 'UTF-8') .'" /> ',$msg);
}
return $msg;
}