Php uppercase first letter

Code examples

10
0

ucfirst() php


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

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

5
0

first character uppercase php

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

php capitalize first letter

ucfirst("hello world!");
2
0

ucfirst

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

//output : Hello samy!
?>
1
0

php uppercase first letter

ucfirst($myword);

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................