/*
* Convert all tabs to spaces
*
* This prevents strings like this: javascript
* Note: we deal with spaces between characters later.
*
*/
457 $str = preg_replace("#\t+#", " ", $str);
This not work :
$str = 'window'; (word 'window must be with 'tab' ( \t )
echo $str; -> window (You see only one space, echo delete many spaces)
$str = preg_replace("#\t+#", " ", $str);
echo $str; - window
This work :
$str = str_replace("\t", "", $str);
