Specify the characters in charlist by giving their hexadecimal value : String Trim Chop « String « PHP






Specify the characters in charlist by giving their hexadecimal value


<?
$str = "   string \t \n";

$str = trim ($str, "\0x09\0x0a");

echo( $str );

echo(strlen($str));
?>
           
       








Related examples in the same category

1.Trim only tab and newline characters from $str
2.Trimming Strings: ltrim
3.Trimming Strings: trim
4.Trimming Strings for 'tab' and 'return'
5.String trim chop and length