Voting

: max(nine, five)?
(Example: nine)

The Note You're Voting On

bgschool
15 years ago
Simple function for use ucfirst with utf-8 encoded cyrylic text

<?php
public function capitalize_first($str) {
$line = iconv("UTF-8", "Windows-1251", $str); // convert to windows-1251
$line = ucfirst($line);
$line = iconv("Windows-1251", "UTF-8", $line); // convert back to utf-8

return $line;
}
?>

<< Back to user notes page

To Top