Archive for December, 2013

Human join / implode helper

Wednesday, December 11th, 2013

Did you notice that when humans list items, they use a different glue for the last item?
“Who was there?” “Tom, Bob and Jane.”

Here’s a Nette helper that does the same.

  1. span class=”st0″>’, ‘‘ and ‘

Use as {$friends|humanJoin} or {$aliens|humanJoin:’, ‘:’ nor ‘}.