php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1924 ucwords not functioning
Submitted: 1999-07-29 15:27 UTC Modified: 1999-07-29 15:29 UTC
From: chrisvik at tapir dot no Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Beta 1 OS: Redhat 6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chrisvik at tapir dot no
New email:
PHP Version: OS:

 

 [1999-07-29 15:27 UTC] chrisvik at tapir dot no
$foo=ucwords("TESTING THIS LINE"); echo $foo;

gives:

TESTING THIS LINE

Should'nt it give:

Testing This Line

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-29 15:29 UTC] andrey at cvs dot php dot net
ucwords() works only on lowercase strings.  To do what you want, try:

$foo = ucwords(strtolower("TESTING THIS LINE"));

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Oct 11 19:00:02 2026 UTC