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

Director of Software Development & Senior Technical Project Manager