$('#' + id_from_json).text(text_from_json);
<div class="counter_wrapper">
<div class="minus">-</div>
<input type="text" name="count" value="0" />
<div class="plus">+</div>
</div>
$last_order = -1;
foreach($items as $item){
if($last_order != -1 && $item['order'] != $last_order)
{
echo '</div>';
}
if($item['order'] != $last_order)
{
echo '<div>';
$last_order = $item['order'];
}
echo $item['order'];
}