note 54450 added to function.ucwords

From: Date: Tue, 05 Jul 2005 03:06:17 +0000
Subject: note 54450 added to function.ucwords
Groups: php.notes 
Request: Send a blank email to php-notes+get-91449@lists.php.net to get a copy of this message
In response to joshuamallory at yahoo dot com: Using CSS to fix a PHP fault is not the ideal way to solve a problem. CSS is browser dependent and can only be used when the data is presented in a web page. A better fix would be something like this: <?php function better_ucwords($string) { $string = ucwords($string); $string = preg_replace('#[\\/][a-z]#e', "strtoupper('$0')", $string); return $string; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.ucwords.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54450 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54450&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54450&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54450&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54450&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54450&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54450&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54450&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91449) next »