Hi
I have a table in my mySQL database:
tag | code
🙂 | <img src=images/smilies/smile.gif>
...etc
I have the following function
function tags($var)
{
$tags_sql = "SELECT * FROM tags";
$tags_res = mysql_query($tags_sql);
while($tags_row = mysql_fetch_array($tags_res))
{
return(str_replace($tags_row['tag'], $tags_row['code'], $var));
}
}
Now I try to use
$msg_content = tags($msg_content);
Doesn't work.
No error.
Inserts text.
ETC.
Just doesn't replace 🙂 with <img src=images/smilies/smile.gif> Really annoying me now...
Anyone got any suggestions?
Thanks!