note 61473 added to function.mb-convert-case

From: Date: Sat, 04 Feb 2006 16:59:51 +0000
Subject: note 61473 added to function.mb-convert-case
Groups: php.notes 
Request: Send a blank email to php-notes+get-102999@lists.php.net to get a copy of this message
This function will capitalize the first letter ( the same as using mb_convert_case with MB_CASE_TITLE flag, but when using a sentence, it'll only capitalize the first word ) <?php function capitalize(&$input) { $input = strtoupper( substr( $input , 0 , 1 ) ).strtolower( substr( $input , 1 ) ); return $input; } ?> Very short, uses substr, strtoupper, and strtoupper only ---- Server IP: 216.194.113.175 Probable Submitter: 24.2.61.27 ---- Manual Page -- http://www.php.net/manual/en/function.mb-convert-case.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61473 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61473&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61473&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102999) next »