/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$attrs = ''; foreach ($attributes as $attribute => $value) { $attrs .= " {$attribute}=\"{$value}\""; } $str = ' ' . $str; '`([^"=\'>])(((http|https|ftp)://|www.)[^\s<]+[^\s<\.)])`i', '$1<a href="$2"'.$attrs.'>$2</a>', $str ); // fügt http:// hinzu, wenn nicht vorhanden return $str; }
Comments
