mom, erstmal richtig lesen, dann antworten *korrigier* sorry
So, jetzt aber:
Code:
$repl_func = create_function('$match', 'return str_repeat(\' \', ' . (int)$space . ' * strlen($match[0]));');
$new = $content;
do
{
$prev = $new;
$new = preg_replace_callback('/^\t+/m', $repl_func, $prev);
}
while($new != $prev);
$content = $new;
unset($new, $prev, $repl_func);