ExamVeda
Login
Home
This question belongs to PHP Functions
Functions
?

What will be the output of the following PHP code?
<?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).
Examveda
Question posted by Examveda
Community

Join the Discussion

2 Comments
Andrew Lviv
Andrew Lviv 6 years ago
correct answer - O'malley Wins The Heavyweight Championship!
Raham Sher
Raham Sher 7 years ago
Option A is the correct answer.