I have a string I'm having trouble converting to twig, I've already tried the PHP to twig converters and am having no luck. Any ideas on how to format this in twig?
<?php $string = strtr($model, array('-R' => '', '-r' => '', ' ' => '', '-reconditioned' => '')); ?>
The filter replace
uses strt
as underlaying function, as seen in the source of twig
{{ example | replace({ '-r': '', '-R': '', '-reconditioned': '',}) }}