note 69873 deleted from function.explode by bjori

From: Date: Mon, 25 Sep 2006 08:04:47 +0000
Subject: note 69873 deleted from function.explode by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-117562@lists.php.net to get a copy of this message
Note Submitter: php at lightphp dot com ---- Since people are posting Proper case functions in this page, here's my version. function strtopropper($str) { $mflag = false; for($x=0;$x<strlen($str);$x++) { if(preg_match('/\\s/', $str[$x])) { $mflag=true; continue; } if((ctype_alpha($str[$x]) && ($mflag || $x==0))) { $str[$x] = strtoupper($str[$x]); $mflag = false; } } return $str; }

« previous php.notes (#117562) next »