PHP 8.5.0 Alpha 1 available for testing

Voting

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

The Note You're Voting On

Anonymous
23 years ago
This seems to be what people want:

function uc_all($string) {
$temp = preg_split('/(\W)/', $string, -1, PREG_SPLIT_DELIM_CAPTURE );
foreach ($temp as $key=>$word) {
$temp[$key] = ucfirst(strtolower($word));
}
return join ('', $temp);
}

[ed note: fixed the code to be correct]

<< Back to user notes page

To Top