What´s the Latte way for sprintf()
- ando
- Member | 4
Is there a “Latte way” for doing something like this?
echo sprintf('nr %d of %d', $nr, $total);
Like in twig:
https://twig.symfony.com/…/format.html
- jiri.pudil
- Nette Blogger | 1032
Well, I guess “Latte way” would be to write it directly in Latte :)
nr {$nr} of {$total}
afaik there is no built-in filter for this, but you can write your own as a
simple wrapper over sprintf