PHP ltrim() function


In this article, We will explain to you PHP ltrim() function with example.

PHP ltrim() function

The ltrim() is a built-in function of PHP. which is used to remove the whitespace from the left side of the string. so you can see our PHP String Function example.

Syntax

ltrim(string,charlist);

Paramerter Option

stringThis is Required Paramerter.
charlistThis is Optional Paramerter. Specifies which characters to remove

Example

<?PHP
   echo ltrim(" This is My website");
?>

Output

This is My website