I want to make looping from array multidimention like database. that's example array that my made:
array[0]['name_product'] = 'big cola';
array[0]['size'] = '4';
array[1]['name_product'] = 'cfc';
array[1]['size'] = '1';
array[2]['name_product'] = 'hot dog';
array[2]['size'] = '1';
array[3]['name_product'] = 'pizza';
array[3]['size'] = '6';
I want to make looping with 2 condition, this is size == '1' and size > '1'. after it I want create loop from every condition, example:
size == '1', so:
no name_product size
1 big cola 4
2 pizza 6
size > '1':
no name_product size
1 cfc 1
2 hot dog 1
how about to make "no" is increment it with array and condition in twig ? I hope you can help me. thank you..