Marco Pivetta <ocram...@...> writes:

> 
> 
> echo str_replace(array("\n","\r\n","  ","\t"),"",$template->execute());What
about this? :)
> 2009/8/13 majk <hosema...@poczta.onet.pl> tab
characters are replaced by ? characters in previous mails
> 

I would think a pre-filter would be best, that way your not doing a replace each
time you execute, but only once at template generation. Also, I think he wanted
remove the front \t?

class removeTabs implements PHPTAL_Filter {
        public function filter($source){
                return $source = preg_replace('/^\t+/m', '', $source);
        }
}

$template->setPreFilter(new removeTabs());


> 
> 
> _______________________________________________
> PHPTAL mailing
listphp...@lists.motion-twin.comhttp://lists.motion-twin.com/mailman/listinfo/phptal
> 
> 
> 
> 
> -- Marco Pivetta - Ocramius AethrilStandard Ogame Project -
StOgamehttp://www.stogame.netMaking Ogame a better place...
> 
> 
> _______________________________________________
> PHPTAL mailing list
> php...@...
> http://lists.motion-twin.com/mailman/listinfo/phptal
> 





_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to