PHP 8.4.24 Released!

Voting

: min(six, seven)?
(Example: nine)

The Note You're Voting On

mhuggins57 at yahoo dot com
21 years ago
There's a ucfirst "function" to make the first character uppercase, but there's no "lcfirst" function to make the first character lowercase.  Here's my own code to accomplish this.

<?
function lcfirst($str) {
    return strtolower(substr($str, 0, 1)) . substr($str, 1);
}
?>

I found this particularly useful for generating XML nodes with the Reflection class.

<< Back to user notes page

To Top