where('price',0,'>'); $db2->where('stock',0,'>'); $db2->where('ean','','!='); $db2->where('status','visible'); $array = $db2->get('goods',1000,'*'); $goods = new Products(); echo ''; echo ''; foreach($array as $row) { $images = $goods -> getImages($row['id']); $db2->where('type','goods'); $db2->where('objectid',$row['id']); $arr2 = $db2->get('languages_texts',NULL,'objectid,lang,translation,col'); foreach($arr2 as $row2) { $trans[$row2['lang']][$row2['col']] = $row2['translation']; } //print_r($images); $s=''; $s .= ' '.$row["id"].''; $s.=''; if(!empty($trans)) { foreach($trans as $lang => $translation) { $s .='<'.$lang.'>'; $s .= '<![CDATA['.htmlspecialchars_decode($translation['title']).']]>'."\n"; $s .= ''."\n"; $s .=''; } } $s.=''; $s .= ''; if(!empty($images)) foreach($images as $image) { $s .= ' '; } $s .= ''; $s .=' '.$row["ean"].' '.$row["price"].' '; echo $s; } echo ''; echo '';