Esempio n. 1
0
function print_children($children)
{
    $html = '';
    foreach ($children as $child) {
        $html .= create_list_item($child);
        if (count($child->wines) > 0) {
            $html .= '<ul class="vins">' . print_wines($child->wines) . '</ul>';
        }
        if (count($child->children) > 0) {
            $html .= '<ul>' . print_children($child->children) . '</ul>';
        }
        $html .= '</div>';
    }
    return $html;
}
Esempio n. 2
0
function print_children($children)
{
    $html = '';
    foreach ($children as $child) {
        $html .= create_list_item($child);
        if (count($child->wines) > 0) {
            $html .= print_wines($child->wines);
        }
        if (count($child->children) > 0) {
            $html .= print_children($child->children);
        }
        $html .= end_table();
    }
    return $html;
}