ucfirst
<?php
$foo = 'hello world!';
$foo = ucfirst($foo); // Hello world!
$bar = 'HELLO WORLD!';
$bar = ucfirst($bar); // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>
// string manipulation function
4.17
6
<?php
/* Convert the first character of "hello" to uppercase: */
echo ucfirst("hello samy!");
//output : Hello samy!
?>
Thank you!
6
0
Are there any code examples left?
New code examples in category PHP