Home >> PHP >> ltrim() function in PHP

ltrim() function in PHP

Remove whitespaces from left side of a string.

Syntax

ltrim(string)

Example

$string="     Hello Dear";
echo ltrim($string);

Output

Hello Dear

Post Your Comment

Next Questions
md5() function
metaphone() function
money_format() function
nl2br() function
number_format() function
ord() function
parse_str() function
printf() function
quotemeta() function
rtrim() function
sha1() function
sha1_file() function
similar_text() function
str_ireplace() function
str_pad() function
str_repeat() function
str_replace() function
str_shuffle() function
str_split() function
str_word_count() function
strcasecmp() function
strchr() function
strcmp() function
strcspn() function
strip_tags() function

Copyright ©2022 coderraj.com. All Rights Reserved.