Here is the sample text…
Writing this letter want to make the phrase my words here click enabled. Already handles www.address.com fine. What can you do?
Ok. Here’s the code…
function makeClickableLinks($text) {
$text = eregi_replace(’(((f|ht){1}tp://)[-a-zA-Z0-9@:%+.~#?&//=]+)’,’\1’, $text);
$text = eregi_replace(’([:space:[{}])(www.[-a-zA-Z0-9@:%+.~#?&//=]+)’,’\1\2’, $text);
$text = eregi_replace(’([_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})’, ‘\1’, $text);
return $text;
}
Here’s what the code does…
It take a “www.address.com” or an “http://address.com” and makes it come back as click enabled.
This is what I need to add to the function…
Take the equivalent of something like, “my words here” and return a click enabled phrase, ie… “my words here” should take the viewer to address.com.
Can anyone make this happen for me?