PHP 8.5.0 Alpha 1 available for testing

Voting

: max(three, zero)?
(Example: nine)

The Note You're Voting On

Nethor
12 years ago
Simple but workable solution:

<?php
mb_internal_encoding
("UTF-8"); // before calling the function

function utf8_ucfirst($str){
preg_match_all("~^(.)(.*)$~u", $str, $arr);
return
mb_strtoupper($arr[1][0]).$arr[2][0];
}
?>

<< Back to user notes page

To Top