Examveda
Examveda

What will be the output of the following PHP code?
<?php
echo ucwords("i love my country");
?>

A. I love my country

B. i love my Country

C. I love my Country

D. I Love My Country

Answer: Option D

Solution(By Examveda Team)

The ucwords() function converts the first character of each word in a string to uppercase.

This Question Belongs to PHP >> Functions

Join The Discussion

Related Questions on Functions