' . "\n"; $table .= "\t" . '' . "\n"; if ( ! is_null( $items ) ) { foreach( $items as $item ) { $table .= self::row( $item, $img_css, $defimg ); } } elseif ( is_null( $items ) ) { $table .= self::row(); } $table .= "\t" . '' . "\n"; $table .= '' . "\n"; return $table; } public static function row( $item = null, $img_css = null, $defimg = null ) { $row = "\t\t" . '' . "\n"; if ( ! is_null( $item ) ) { $class = ( ! is_null( $img_css ) ) ? $img_css : ''; $src = ( isset( $item[ 'image' ] ) ) ? $item[ 'image' ] : $defimage; $alt = $item[ 'title' ] . ' (' . $item[ 'price-title' ] . ')'; $url = $item[ 'url' ]; $title = $item[ 'title' ]; $price = $item[ 'price-title' ]; $row .= "\t\t\t" . '' . "\n"; $row .= "\t\t\t\t" . '' . "\n"; $row .= "\t\t\t\t\t" . '' . $alt . '' . "\n"; $row .= "\t\t\t\t" . '' . "\n"; $row .= "\t\t\t" . '' . "\n"; $row .= "\t\t\t" . '' . "\n"; $row .= "\t\t\t\t" . '' . "\n"; $row .= "\t\t\t\t\t" . $title . '
(' . $price . ')' . "\n"; $row .= "\t\t\t\t" . '
' . "\n"; $row .= "\t\t\t" . '' . "\n"; } elseif ( is_null( $item ) ) { $row .= "\t\t\t" . '' . "\n"; $row .= "\t\t\t\t" . 'No results found for this search.' . "\n"; $row .= "\t\t\t" . '' . "\n"; } $row .= "\t\t" . '' . "\n"; return $row; } } }