hello, new to php here, been studying and watching videos from lynda.com but im still at a stage where it confuses me. i am running into a depricated functino ereg_replace()
here is the code block im using.
class autoActiveLink {
function makeActiveLink($originalString){
$newString = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $originalString);
return $newString;
}
}
if some one could correct this for me and give me a small explanation as to what they did and why i would be very greatfull! please please please help me out here. i dont ask for or need alot of help but i could really use it on this.
here is the code block im using.
class autoActiveLink {
function makeActiveLink($originalString){
$newString = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>", $originalString);
return $newString;
}
}
if some one could correct this for me and give me a small explanation as to what they did and why i would be very greatfull! please please please help me out here. i dont ask for or need alot of help but i could really use it on this.