Interviewer And Interviewee Guide

PHP Interview Question:

What is the output of the ucwords function in this example?

Submitted by: Administrator
$formatted = ucwords("GLOBALGUIDELINE IS COLLECTION OF INTERVIEW QUESTIONS");
print $formatted;
What will be printed is GLOBALGUIDELINE IS COLLECTION OF INTERVIEW QUESTIONS.
ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it's worth using strtolower() first.
Submitted by: Administrator

Read Online PHP Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.