PHP trim() Function

The trim() function is used to removes whitespaces from both sides of a sentance.

Demo :



Type Character :  
Empty

Following code is used to trim() demo code If you need to copy and use your web site.


<?php
$str = " Hello World ";
$result =trim($str);
echo $result;
?>

The trim() function have in the two parameters that name is string str,string character_mask.

Free Download Script :

If you need trim() function demo code download from following link.

Download




Content