cgm225 Posted March 5, 2008 Share Posted March 5, 2008 I have a variable containing a string which I ultimately use to name a directory after. Currently, I trim and strip it down, removing bad characters, spaces, etc. However, I also want to make the string all lowercase. How could I modify the following to do that? $directory = trim(preg_replace("/[^a-zA-Z0-9s]/", "",stripslashes($directory))); Quote Link to comment Share on other sites More sharing options...
craygo Posted March 5, 2008 Share Posted March 5, 2008 strtolower(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.