Posted by Arjen on 02/25/06 17:04
I currently convert hyperlinks on my site with this piece of code
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"<a href=\"\\0\">\\0</a>", $text)
Is there anyway to shorten the second part of the link linke this
<a href
="http://www.mysite.com/longtext_and_more_stuff>http://www.mysite.com/lon
....</a>
Im just no sure how to do this ... ive tried substr and all that but the
problem is I dont know wich url im working at cause this piece of code
just changes all the urls in the text
Arjen
Navigation:
[Reply to this message]
|