Replacing Tabs with Spaces : str_replace « String « PHP
- PHP
- String
- str_replace
Replacing Tabs with Spaces
<?php
$str = "
\tline
\t\tline
\t\t\tline
\t\t}
\t}
";
$replaced = str_replace("\t", ' ', $str);
echo "<pre>{$replaced}</pre>";
?>
Related examples in the same category