note 14841 deleted from function.strtoupper by jimw

From: Date: Wed, 31 Oct 2001 00:43:19 +0000
Subject: note 14841 deleted from function.strtoupper by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-19625@lists.php.net to get a copy of this message
I needed a way to take a string of characters and convert the first element to uppercase. since strtoupper operates on the whole string, I used a combination of substr, and substr_replace to pick out the uppercase letter of the first string. $result = substr_replace ($string, substr(strtoupper($string), 0, 1), 0, 1)

« previous php.notes (#19625) next »