Capitalize first letters of a string with php
How can I make the first letters of each word in a string uppercase in PHP?
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Answer ( 1 )
You can use the ucwords() function which is a built-in PHP function that converts the first character of each word in a string to uppercase and the rest to lowercase. It’s similar to ucfirst(), which only capitalizes the first character of the first word in a string.
Then use the function like this: