Jump to content

Making string all lowercase...


cgm225

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.