Answers for "php first word lowercase"

PHP
16

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
1

php to lowercase

<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtolower($str);
echo $str; 
// Result: mary had a little lamb and she loved it so
Posted by: Guest on January-18-2021

Browse Popular Code Answers by Language