Answers for "sentence case in php"

PHP
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
0

php title case

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

$bar = 'HELLO WORLD!';
$bar = ucwords($bar);             // HELLO WORLD!
$bar = ucwords(strtolower($bar)); // Hello World!
?>
Posted by: Guest on May-06-2021
0

is switch case case sensitive in php

<?php
$smart = "cRikEy";

switch (strtolower($smart)) {
     case "crikey": // Note the lowercase chars
         echo "Crikey";
         break;
     case "hund":
         echo "Hund";
         break;
     case "kat":
         echo "Kat";
         break;
     default:
         echo "Alt Andet";
}
?>
Posted by: Guest on April-28-2021

Browse Popular Code Answers by Language