string trim ( string str [, string trim_chars] ) strips spaces, new lines, and tabs : trim « String « PHP






string trim ( string str [, string trim_chars] ) strips spaces, new lines, and tabs

 
<?
    $a = trim(" testing ");

    $b = trim(" testing ", " teng");
?>
  
  








Related examples in the same category

1.Checking the length of a trimmed string
2.Combining trim() and strlen()
3.trim() function removes all whitespace from both sides of string