trim() function remove the whitespaces and other predefined character from tht both side of a string
Syntaxtrim(character)
Example
<?php $str=" hello india"; echo "without trim".$str; // remove whitespaces from the both the string echo "with trim".trim($str); ?> |
without trom: hello india
with trim:hello india
0 comments:
Post a Comment