ucwords method in php

What will be the output of [ ucwords(INTERVIEWHOME)?
The ucwords function makes every first letter of a word capital. It transforms every first letter of a word to a uppercase character.

However, in this example the rest of the letters are also capital.
Hence the output of ucwords(INTERVIEWHOME) will be

To convert the given string to "INTERVIEWHOME", you can first use strtolower to convert it to all lower case characters and then use ucwords on it.


Post a Comment