Answers for "php convert first letter to uppercase"

PHP
14

string first letter uppercase php

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

$bar = 'HELLO WORLD!';
$bar = ucfirst($bar);             // HELLO WORLD!
$bar = ucfirst(strtolower($bar)); // Hello world!
?>
Posted by: Guest on July-03-2020
2

ucfirst

<?php
/* Convert the first character of "hello" to uppercase:  */
echo ucfirst("hello samy!");

//output : Hello samy!
?>
Posted by: Guest on June-23-2020
1

php uppercase first letter

ucfirst($myword);
Posted by: Guest on November-05-2020
2

php string to uppercase

<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtoupper($str);
echo $str; // show: MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
Posted by: Guest on February-09-2021

Code answers related to "php convert first letter to uppercase"

Browse Popular Code Answers by Language