Hola
Lanselot, aun sigue sin funcionar
Código PHP:
<?php
function hyperlink($text) {
// match protocol://address/path/file.extension?some=variable&another=asf%
$text = preg_replace("/\s([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)([\s|\.|\,])/i", " <a href=\"$1\">$1</a>$2", $text);
// match [url]www.something.domain/path/file.extension?some=variable&another=asf%[/url]
$text = preg_replace("/\s(www\.([a-z][a-z0-9_\..-]*[a-z]{2,6})([a-zA-Z0-9\/*?&%-]*))\s/i", " <a href=\"http://$1\">$2</a> ", $text);
return $text;
}
$text = "www.algo.com";
echo hyperlink($text);
?>
Gracias