I have this word:
katii
But I want the first character in uppercase K
. How can I do this?
I have this word:
katii
But I want the first character in uppercase K
. How can I do this?
You can use below as prescribed by php.net
<?php
$foo = 'hello world!';
$foo = ucfirst($foo); // Hello world!
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>
$upper = strtoupper(substr('katii', 0, 1)); //K
You should make your question a little clearer in future, though.