PHP - Prepend a url to all links with no http or https

kaylakarnivor

New Member
Relatively new to php and looking for some help in updating links on a specific page. The page has numerous links eg. \[code\]href=http://stackoverflow.com/link/\[/code\] and I would like to code the page to identify these links (links that do not already have \[code\]http\[/code\] or \[code\]https\[/code\]) and prepend with a url eg. \[code\]www.domain.com\[/code\] to each. Basically ending up with \[code\]href=http://stackoverflow.com/questions/3681049/www.domain.com/link/\[/code\]. Any help would be greatly appreciated.
 
Back
Top