PHP Cleaning Up String With Trim(), Itrim(), And Strip_Tags() – String Function

<?php
$text = "\t\t\tlots of room";
$text = trim( $text );
print $text;
?>==
keep white space at the beginning of a string but remove it from the end. <?php
$text = "\t\t\tlots of room  ";
$text = rtrim( $text );
print $text;
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.