Posted By

fugue on 12/29/06


Tagged

regex


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Who likes this?

1 person has marked this snippet as a favorite

vali29


Replace URL with link


Published in: PHP 






Expand | Embed | Plain Text
  1. $text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $text);

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: tannerc on January 18, 2010

With ereg_replace being unsupported by future versions of PHP, is there another way to do this as effectively?

Posted By: CraigFoot on February 21, 2010

preg_replace?

You need to login to post a comment.

Download royalty free graphics