After I finished the 3 Pan Galactic Gargle Blasters, "Martin Petersen"
<martin@fyrreklitten.dk> just offered me, he muttered some weird
stuff, and I had to correct this gibberish:
>Er der nogen der har et lille stykke kode, der via
>ereg_replace()/preg_replace() kan erstatte alle url'er på formen
>
http://adresse i en streng med links, altså: <a
>href="
http://adresse">adresse??
:Her er en til http://
$foo = ereg_replace("((f|ht){1}tp://[a-zA-Z0-9@:%_.~#-\?&]+)", "<a
href=\"\\1\" target=\"_blank\">\\1</a>",$foo);
:Og her er en til mail adresser.
$message =
ereg_replace("([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)","<a
href=\"mailto:\\1\">\\1</a>",$message);
--
Martin Mouritzen. |
http://www.trendy.dk
The truth is out there! Does anyone know the URL?