replace tabs in a string

<?php
$original = “string\tstring\tstring\tstring\t”;
//replace the tabs with a space
$replaced = str_replace(“\t”, ‘ ‘, $original);
echo “<pre>{$original}</pre>”;
echo “<pre>{$replaced}</pre>”;
?>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*