note 19214 added to function.substr

From: Date: Wed, 20 Feb 2002 00:51:57 +0000
Subject: note 19214 added to function.substr
Groups: php.notes 
Request: Send a blank email to php-notes+get-26818@lists.php.net to get a copy of this message
another method: <? $foo = "cdhx"; $length = strlen($foo); $length--; // This would uppercase the first char (initial) and cut the rest off $foo = ucwords(substr("$foo", 0, -$length)); echo $foo; ?> -- http://www.php.net/manual/en/function.substr.php http://master.php.net/manage/user-notes.php?action=edit+19214 http://master.php.net/manage/user-notes.php?action=delete+19214 http://master.php.net/manage/user-notes.php?action=reject+19214

« previous php.notes (#26818) next »