echo strtoupper('hello');
strtoupper will use the entire string.
If you are only interested in writing the first letter, you can use ucfirst :
echo ucfirst('hello!');
If you want to smooth out the first letter of each word in a string, use ucwords :
echo ucwords('hello world!');
source
share