1//string to all uppercase
2$string = "String with Mixed use of Uppercase and Lowercase";
3//php string to uppercase
4$string = strtoupper($string);
5// = "STRING WITH MIXED USE OF UPPERCASE AND LOWERCASE"
1$foo = 'hello world!';
2$foo = ucwords($foo); // Hello World!
3
4$bar = 'HELLO WORLD!';
5$bar = ucwords($bar); // HELLO WORLD!
6$bar = ucwords(strtolower($bar)); // Hello World!
7
8//With custom delimiter
9$foo = 'hello|world!';
10$bar = ucwords($foo); // Hello|world!
11
12$baz = ucwords($foo, "|");