Forum Moderators: coopster

Message Too Old, No Replies

All CAPS, is there a code for this?

         

internetheaven

6:58 pm on Nov 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Say I wanted to create a comprehensive product code based on what the product in the database is called. Therefore I'd like:

"Blue Widget in Cotton"

to become:

"BLUEWIDGETCOTTON"

I can get rid of the space and "in"'s using str_replace but is there any code that will turn it into all capitals?

coopster

7:06 pm on Nov 8, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yep. strtoupper [php.net]

internetheaven

8:14 pm on Nov 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, that was easy enough! Thanks.