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
 [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 18:00:01 2026 UTC