I am taking a string and trying to convert it into a url friendly version. In short, I need spaces changed to "_" and only letters and numbers. e.g "Special's Menu Today?" -> "Specials_Menu_Today.html"
I can use str_replace for some parts or make an array of valid/invalid characters, but I'd like to hear suggestions on how to do this 'nicely'. Is there a built in function that can do this easily?
Thanks.
I can use str_replace for some parts or make an array of valid/invalid characters, but I'd like to hear suggestions on how to do this 'nicely'. Is there a built in function that can do this easily?
Thanks.