string first letter uppercase php
snippet in php

string first letter uppercase php

user8935


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

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

php capitalize first letter

user3420

ucfirst("hello world!");