Answers for "php ucfirst"

PHP
9

php string to uppwe

$lowercase = "this is lower case";
$uppercase = strtoupper($lowercase);

echo $uppercase;
// THIS IS LOWER CASE
Posted by: Guest on February-24-2020
6

php ucfirst all words

$foo = 'hello world!';
$foo = ucwords($foo);             // Hello World!

$bar = 'HELLO WORLD!';
$bar = ucwords($bar);             // HELLO WORLD!
$bar = ucwords(strtolower($bar)); // Hello World!

//With custom delimiter
$foo = 'hello|world!';
$bar = ucwords($foo);             // Hello|world!

$baz = ucwords($foo, "|");
Posted by: Guest on July-07-2020
11

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
Posted by: Guest on February-20-2020
7

first character uppercase php

ucwords("hello world"); // Hello World
ucfirst("hello world"); // Hello world
Posted by: Guest on August-21-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

Browse Popular Code Answers by Language