Friday, November 7, 2008

What’s the output of the ucwords function in this example?

What’s the output of the ucwords function in this example?
$formatted = ucwords("CENTER IS COLLECTION OF INTERVIEW QUESTIONS");print $formatted;
What will be printed is CENTER 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.

No comments:

security header validate

  HTTP Security Headers Check Tool - Security Headers Response (serpworx.com)