$text = "hello, world 🙂 😃"; $smileys = array ("🙂" => "smile", "😃" => "laugh"); --> $text = "hello, world smile laugh";
foreach ($smileys as $from => $to) $text = ereg_replace($from, $to, $text);
Be careful if your $from and/or $to contain ereg metachars!
If you use str_replace() instead of ereg_replace you do not have to worry about regular expressions catching it up...
...about such simple solution. :-)