Nikpro Posted June 30, 2016 Share Posted June 30, 2016 (edited) HiI would like to create a delicious proposal to humans. I'm half way. I only left out showed no repeat value. At the moment, I have shown on the basis of a product review. 1. Categories 2. Manufacturers But now they are repeated I added line 266 $ Obj-> id_manufacturer = (int) ($ productsImagesArray [$ productViewed] [ 'id_manufacturer']); $ Obj-> id_category_default = (int) ($ productsImagesArray [$ productViewed] [ 'id_category_default']); and appeal to the base SELECT MAX(image_shop.id_image) id_image, p.id_product, il.legend, product_shop.active, pl.name, p.id_manufacturer, p.id_category_default, m.name AS manufacturer_name, in tpl {$link->getCategoryLink($viewedProduct->id_category_default)} How can I eliminate the repetition of values? $c=array(); foreach($a as $b) { if(!in_array($b,$c)) { $c[]=$b; echo $b; } } I know that there is a way to compare. but after spending 2 days I was not able to find a solution ((( if (is_array($obj->id_manufacturer) && count($obj->id_manufacturer)) { foreach ($obj->id_manufacturer as $key => $obj->id_manufacturer) { if ($productsImagesArray[$productViewed]['id_manufacturer'] == $obj->id_manufacturer) { unset($obj->id_manufacturers[$key]); } } } ; Edited June 30, 2016 by Nikpro (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now