note 54931 added to function.strtolower

From: Date: Tue, 19 Jul 2005 23:04:32 +0000
Subject: note 54931 added to function.strtolower
Groups: php.notes 
Request: Send a blank email to php-notes+get-92190@lists.php.net to get a copy of this message
There's a ucfirst "function" to make the first character uppercase, but there's no "lcfirst" function to make the first character lowercase. Here's my own code to accomplish this. <? function lcfirst($str) { return strtolower(substr($str, 0, 1)) . substr($str, 1); } ?> I found this particularly useful for generating XML nodes with the Reflection class. ---- Manual Page -- http://www.php.net/manual/en/function.strtolower.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54931 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54931&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54931&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54931&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54931&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54931&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54931&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54931&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92190) next »