note 101021 added to function.ucfirst
| From: | hassangml at gmail dot com | Date: | Sun, 21 Nov 2010 03:11:19 +0000 |
| Subject: | note 101021 added to function.ucfirst | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174230@lists.php.net to get a copy of this message | ||
$str = 'first_name';
echo my_ucfirst($str); // it will return First_Name
function my_ucfirst($str) {
$strarr = explode('_', $str) ;
$strarr_new = array();
foreach ($strarr as $st)
$strarr_new[] = ucfirst($st);
$str_new = implode('_', $strarr_new);
return $str_new;
}
----
Server IP: 69.147.83.197
Probable Submitter: 196.29.161.85 (proxied: 41.202.186.41)
----
Manual Page -- http://www.php.net/manual/en/function.ucfirst.php
Edit -- https://master.php.net/note/edit/101021
Del: integrated -- https://master.php.net/note/delete/101021/integrated
Del: useless -- https://master.php.net/note/delete/101021/useless
Del: bad code -- https://master.php.net/note/delete/101021/bad+code
Del: spam -- https://master.php.net/note/delete/101021/spam
Del: non-english -- https://master.php.net/note/delete/101021/non-english
Del: in docs -- https://master.php.net/note/delete/101021/in+docs
Del: other reasons-- https://master.php.net/note/delete/101021
Reject -- https://master.php.net/note/reject/101021
Search -- https://master.php.net/manage/user-notes.php