PHP preg_replace adding http:// only when missing
Often people post links in our classifieds that start just with just www. or nothing at all (for instance www.blahblah.com or blahblah.com).
I need a preg_replace function that will add http:// to any link that doesn't have it.
So if a link is: www.blahblah.com it should become http://www.blahblah.com
If a links is blahblah.com it should become http://blahblah.com
Thank…
PHP preg_replace adding http:// only when missing
See original post by qwikad.com
Leave a Reply
You must be logged in to post a comment.