php capitalize first letter
snippet in php

ucfirst() php

user903


<?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 

string first letter uppercase php

user1529


<?php
$foo = 'hello world!';
$foo = ucfirst($foo);             // Hello world!

$bar = 'HELLO WORLD!';
$bar = ucfirst($bar);             // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>

first character uppercase php

user5554

ucwords("hello world"); // Hello World
ucfirst("hello world"); // Hello world

php capitalize first letter

user2064

ucfirst("hello world!");

capitalize first letter c++

user8142

string str = "something";
str[0] = toupper(str[0]);