$text = preg_replace( "/(?<!<a href=\")((http|ftp)+(s)?:\/\/[^<>\s]+)/i", "<a style=\"text-decoration:underline\" href=\"\\0\">URL</a>", $text );
:D
Evan Nemerson wrote:
On Thursday 18 December 2003 01:37 pm, Vincent M. wrote:
Hello,
Is there any way to manage links in an array and transform them. For example, I have this text in the database:
php.net/preg_replace
--- Software & Support Media, produc-ers of the International PHP Conference, are pleased to announce a new monthly version of their print publication. For more information, you can go here: http://www.google.com Thanks. ---
And transform this text to: --- Software & Support Media, producers of the International PHP Conference, are pleased to announce a new monthly version of their print publication. For more information, you can go here: <a href=\"http://www.google.com\">url</a> Thanks. --
Thanks, Vincent.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php