V
STRINGS IN PHP
PHP
INDIA:HYDRABAD/ INDIA:CHENNI/ INDIA:/DELHI/ trim() The trim() function is used to remove the white spaces from both sides of a string. This function was introduced in PHP3. Example: <?php $text = “\t\t We are using trim :) ... “; $trimed = trim($text); echo $trimed.”<br>”; $trimed = trim($text,” \t.”); echo $trimed.”<br>”; ?> The output of the above program is as follows: We are using trim :) ... We are using trim :)
78
FAST TRACK
www.thinkdigit.com