Hi all i have this;
Although that doesn't parse urls if there is no http://, can anyone modify that or create one like it to handle urls with the http:// ?
Thanks!
PHP:
//urls
$chr_limit = '45';
$add = '...';
$view = preg_replace("!(http:/{2}[\w\.]{2,}[/\w\-\.\?\&\=\#]*)!e", "'<a href=\"\\1\" title=\"\\1\" target=\"_blank\">'.(strlen('\\1')>=$chr_limit ? substr('\\1',0,$chr_limit).'$add':'\\1').'</a>'", $view);
Although that doesn't parse urls if there is no http://, can anyone modify that or create one like it to handle urls with the http:// ?
Thanks!








