|
Converting URLs to anchor tags |
|
Using preg_replace to convert non-anchored URLs into HTML hyperlinks.
-
<?php
-
$text = "This is a link to http://www.wjgilmore.com/.";
-
-
-
// from "Beginning PHP 5 and MySQL: From Novice to Professional", courtesty apress.com
-
?>
|