I am trying to write out links to a page to make a link list from a MySql DB. I want to make sure that all the links are consistant and write out http://www.site.com into the href tags.
As the user has the ability to copy and past links into the admin section there may be some rows that have the link Url as http://www. and others that are just www.
What I want to know is what function is best to use in PHP for removing the first instance of “http://” in a string. In ASP it would be written as
<a href="http://<%=replace(rsLinks.Fields.Item("LinkURL").Value,"http://","")%>"
just need to know how to do it in PHP, any help is appreciated.