Voting

: seven plus zero?
(Example: nine)

The Note You're Voting On

Michael
18 years ago
This is what you would expect php to deliver if there was a built-in function named ucsentence.

function ucsentence ($string){
$string = explode ('.', $string);
$count = count ($string);
for ($i = 0; $i < $count; $i++){
$string[$i] = ucfirst (trim ($string[$i]));
if ($i > 0){
$string[$i] = '&nbsp;&nbsp;' . $string[$i];
}
}
$string = implode ('.', $string);
return $string;
}

<< Back to user notes page

To Top