SyntaxStudy
Sign Up
Home PHP Reference strtolower() / strtoupper()

strtolower() / strtoupper()

function

Converts a string to lowercase or uppercase. Use mb_ variants for multibyte/Unicode text.

Syntax

strtolower(string $string): string

Example

php
<?php
echo strtolower('Hello WORLD'); // hello world
echo strtoupper('Hello World'); // HELLO WORLD
echo ucfirst('hello world');    // Hello world
echo ucwords('hello world');    // Hello World