Posted By

fugue on 12/29/06



Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Replace URL with link

 / Published in: PHP

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

Report this snippet  


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


Posted By: accsk on January 21, 2011

Ah !Thank you for sharing。Look forward to your articles. I will follow you

You need to login to post a comment.