PHP 8.5.0 Alpha 4 available for testing

Voting

: five minus zero?
(Example: nine)

The Note You're Voting On

bgschool
16 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