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))); Link to comment https://forums.phpfreaks.com/topic/94554-making-string-all-lowercase/ Share on other sites More sharing options...
craygo Posted March 5, 2008 Share Posted March 5, 2008 strtolower(); Link to comment https://forums.phpfreaks.com/topic/94554-making-string-all-lowercase/#findComment-484143 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.