note 10778 added to ereg_replace
| From: | mr_atheist at hotmail dot chek dot com | Date: | Sun, 21 Jan 2001 23:42:24 +0000 |
| Subject: | note 10778 added to ereg_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-10055@lists.php.net to get a copy of this message | ||
To be able to transform an URL such as [url]http://www.php.net[/url] (UBB-tags) into a hyperlink use :
$inp = preg_replace("/(\[url\])(.*)(\[\/url\])/U","<a
href=\\2>\\2</a>", $inp);
http://www.php.net/manual/en/function.ereg-replace.php