InterviewSolution
| 1. |
What's The Output Of The Ucwords Function In This Example? |
|
Answer» $formatted = ucwords(”FYICENTER IS COLLECTION OF INTERVIEW QUESTIONS”); What will be printed is FYICENTER 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. $formatted = ucwords(”FYICENTER IS COLLECTION OF INTERVIEW QUESTIONS”); What will be printed is FYICENTER 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. |
|