?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$title = "O'malley wins the heavyweight championship!";
echo ucwords($title);
?>
<?php
$title = "O'malley wins the heavyweight championship!";
echo ucwords($title);
?>
Answer & Solution
Correct Answer:
Option
D
The ucwords() function capitalizes the first letter of each word in a string. Its prototype follows: string ucwords(string str).
Join the Discussion
Login to post a comment or share your explanation.
Login