We group them around the underscore then check the elements in "product" 1: 4 kg of Orange (I should say "4 kgs.") 2: 1 bunch of Spinach
We group them around the underscore<br> then check the elements in "product"<br> <script language="bee"> group cart; foreach (result%keys) { value "{foreach}: {matrix%{foreach}:qty} {matrix%{foreach}:unit} of {matrix%{foreach}:product}\n"; if ('{matrix%{foreach}:qty}' > 1) value '(I should say "{matrix%{foreach}:qty|plural:{matrix%{foreach}:unit}}.")\n'; value "<br>\n"; } </script>
Back home