I have a search function on my site that allows people to search keywords or urls.
I want to remove the "http://" when people do a search for a url leaving it www.something.com
I have figured out it will be something like:
But i am not 100% sure and no matter where I put it in my code, it doesn't work.PHP Code:
return ereg_replace("(https?)://", "", $url);
Can anyone shed some light on how to do this?
I have attached the php file that controls the search functions for my site in case you would like to see it.