Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (14)?
55. What will be the output of the following PHP code?
<?php
echo ucwords("hi, there how are you?");
?>
- Hi, there how are you?
- Hi, There How Are You?
- hi, there how are you?
- HI, THERE HOW ARE YOU?
Answer: B) Hi, There How Are You?
Explanation:
The ucwords() function is used to convert the first character of each word in a string to uppercase. Thus, the output will be "Hi, There How Are You?".