ltrim() function to strip white space only from the beginning of a string. : ltrim « String « PHP






ltrim() function to strip white space only from the beginning of a string.

 
<?php
$text = "\t\t\tlots of room  ";
$text = ltrim( $text );
print "<pre>$text</pre>";
?>
  
  








Related examples in the same category

1.ltrim() function removes the whitespace and special characters from the left side of string
2.Left padding using the default of spaces