Making strings safe for use in a URL with PHP

These days taking advantage of Search Engine Optimization (SEO) by packing the URL with a string of words is commonplace but not all strings are safe to use in a URL.  The following PHP script function will prepare your string for use in a URL.

 

Author: Richard Soares

I’m a freelance software developer with more than 20 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork.