link clickable and wordwrap
<p>i'm using php wordwrap for my comment box.</p>

<p>This is my clickable function,</p>

<pre><code>function clickable_link($text)
{
$ret = ' ' . $text;
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&amp;~/.\-;:=,?@\[\]+]*)#is", "\\1&lt;a class=\"hrefLink\" href=\"\\2\" target=\"_blank\"&gt;\\2&lt;/a&gt;", $ret);
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&amp;~/.\-;:=,?@\[\]+]*)#is", "\\1&lt;a class=\"hrefLink\" href=\"http://\\2\" target=\"_blank\"&gt;\\2&lt;/a&gt;", $ret);
$ret = preg_replace("#(^|[\n ])([a-z0-9&amp;\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1&lt;a href=\"mailto:\\2@\\3\"&gt;\\2@\\3&lt;/a&gt;", $ret);
$ret = substr($ret, 1);
return $ret;
} 
</code></pre>

<p>and this is my wordwrap for comment</p>

<pre><code>$comment = clickable_link($comment);
$comment = wordwrap($comment, 25, "\n", false);
</code></pre>

<p>so, once the word limit for 25 is reached, my comment box break my link</p>

<pre><code>http://www.websitetitle.com/showthread.php?t=2000
</code></pre>

<p>link become like this</p>

<pre><code>http://www.websitetitle.com/showthread.php?
&lt;br&gt;
t=2000
</code></pre>

<p>The link is broken. so is it possible to fix the link or any other workaround?</p>

<p>Thank you</p>
