function print_wines($wines) { $html = ''; foreach ($wines as $wine) { $id = $wine->id; $price = $wine->price; $defaultLabel = $wine->defaultLabel; $label = $wine->label != '' ? format_wine_label_custom($wine->label) : $defaultLabel; $html .= "<li class='vin' data-id='{$id}'><span class='price'>{$price}</span> {$label}</li>"; } return $html; }
function print_wines($wines) { $html = ''; foreach ($wines as $wine) { $id = $wine->id; $price = $wine->price; $defaultLabel = $wine->defaultLabel; if ($wine->label != '') { $label = format_wine_label_custom($wine->label); } else { $label = $defaultLabel; } $html .= "<tr><td class='price'><span class='price'>{$price}</span></td><td>{$label}</td></tr> "; } return $html; }