note 71508 added to function.preg-replace
| From: | ecrona at gmail dot com | Date: | Sat, 02 Dec 2006 23:53:45 +0000 |
| Subject: | note 71508 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120243@lists.php.net to get a copy of this message | ||
Hello
I've found a way to use smilies (BB code aswell)
$smilies=array(
':)' => "<img src='img/smile.gif'>",
':(' => "<img src='img/sad.gif'>",
);
$text = str_replace(array_keys($smilies), array_values($smilies), $text);
I hope i could help ...
----
Server IP: 193.27.201.10 (proxied: 193.27.201.10 1.0 www1.shellkonto.se:3128 (squid/2.5.STABLE4))
Probable Submitter: 213.114.208.11
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- https://master.php.net/note/edit/71508
Del: integrated -- https://master.php.net/note/delete/71508/integrated
Del: useless -- https://master.php.net/note/delete/71508/useless
Del: bad code -- https://master.php.net/note/delete/71508/bad+code
Del: spam -- https://master.php.net/note/delete/71508/spam
Del: non-english -- https://master.php.net/note/delete/71508/non-english
Del: in docs -- https://master.php.net/note/delete/71508/in+docs
Del: other reasons-- https://master.php.net/note/delete/71508
Reject -- https://master.php.net/note/reject/71508
Search -- https://master.php.net/manage/user-notes.php