PHP Replacing Tabs With Spaces – String Function

<?php$str = "
\tline
\t\tline
\t\t\tline
\t\t}
\t}
";$replaced = str_replace("\t", '    ', $str);echo "<pre>{$replaced}

“;
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.