PHP - String Functions
What is the output of the following PHP code?
$name = "john doe";
echo ucfirst($name);
$name = "john doe";
echo ucfirst($name);
ucfirst() capitalizes only the first character of the entire string, leaving the rest unchanged.ucfirst(), it becomes "John doe" (only first letter capitalized).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions