Intereting Posts

Как использовать функцию array_unique в stdClass Object Array PHP

Я пытаюсь получить уникальный массив, но я не могу, потому что я работаю с объектом stdClass. Мой объект называется $items и имеет повторяющиеся значения. Часть его ниже.

Как мы можем сделать уникальный массив с помощью php?

 Array ( [0] => stdClass Object ( [product_id] => 93 [model] => VNA452E1 [sku] => [upc] => [ean] => [jan] => [isbn] => [mpn] => [location] => [quantity] => 1 [stock_status_id] => 5 [image] => data/1NI_FD_245430_VNA453E1_4_Particolari_BIG.jpg [manufacturer_id] => 0 [shipping] => 1 [price] => 140.0000 [points] => 0 [tax_class_id] => 0 [date_available] => 2014-07-22 [weight] => 0.00000000 [weight_class_id] => 1 [length] => 0.00000000 [width] => 0.00000000 [height] => 0.00000000 [length_class_id] => 1 [subtract] => 1 [minimum] => 1 [sort_order] => 1 [status] => 1 [date_added] => 2014-07-23 16:14:26 [date_modified] => 2014-07-23 16:54:52 [viewed] => 9 [language_id] => 2 [name] => NIKON COOLPIX S02 [description] => <p><span style="font-size: 12pt;"><b>SENSORE</b>:CMOS, 1/3.1, Megapixel Reali : 14,17 , Megapixel Effettivi : 13,20 ; </span></p> <p><span style="font-size: 12pt;"><b>OBIETTIVO</b>: Zoom Ottico : 3 x, Zoom Digitale : 4 x, Apertura Max alla Focale Min : 3,30 F, Apertura Max alla Focale Max : 5,90 F; </span></p> <p><span style="font-size: 12pt;"><b>DISPLAY</b>:2,63 inches; </span></p> <p><span style="font-size: 12pt;"><b>OTTURATORE</b>:1, 1/2000; </span></p> <p><span style="font-size: 12pt;"><b>MEMORIA</b>:7300 mb; </span></p> <p><span style="font-size: 12pt;"><b>REGISTRAZIONE</b>:Risoluzione Max Immagine Foto (Larghezza) : 4160 , Risoluzione Max Immagine Foto </span></p> <p><span style="font-size: 12pt;">(Altezza) : 3120 , Registrazione HD; </span></p> <p><span style="font-size: 12pt;"><b>CONNESSIONI</b>:Connessione HDMI; </span></p> <p><span style="font-size: 12pt;"><b>ALTRE CARATTERISTICHE</b>:Microfono Incorporato, Adattabilità Treppiedi Standard; </span></p> <p><span style="font-size: 12pt;"><b>PESI E MISURE</b>:Altezza : 5,13 cm, Larghezza : 7,71 cm, Profondità : 1,75 cm, 100 g; </span></p> <p><span style="font-size: 12pt;"><b>GARANZIA</b>: 24 mesi.</span></p> <p><br /><br /></p> <p><br /><br /><br /></p> [meta_description] => [meta_keyword] => NIKON COOLPIX S02 [tag] => [category_name] => Cameras [category_id] => 33 ) [1] => stdClass Object ( [product_id] => 93 [model] => VNA452E1 [sku] => [upc] => [ean] => [jan] => [isbn] => [mpn] => [location] => [quantity] => 1 [stock_status_id] => 5 [image] => data/1NI_FD_245430_VNA453E1_4_Particolari_BIG.jpg [manufacturer_id] => 0 [shipping] => 1 [price] => 140.0000 [points] => 0 [tax_class_id] => 0 [date_available] => 2014-07-22 [weight] => 0.00000000 [weight_class_id] => 1 [length] => 0.00000000 [width] => 0.00000000 [height] => 0.00000000 [length_class_id] => 1 [subtract] => 1 [minimum] => 1 [sort_order] => 1 [status] => 1 [date_added] => 2014-07-23 16:14:26 [date_modified] => 2014-07-23 16:54:52 [viewed] => 9 [language_id] => 2 [name] => NIKON COOLPIX S02 [description] => <p><span style="font-size: 12pt;"><b>SENSORE</b>:CMOS, 1/3.1, Megapixel Reali : 14,17 , Megapixel Effettivi : 13,20 ; </span></p> <p><span style="font-size: 12pt;"><b>OBIETTIVO</b>: Zoom Ottico : 3 x, Zoom Digitale : 4 x, Apertura Max alla Focale Min : 3,30 F, Apertura Max alla Focale Max : 5,90 F; </span></p> <p><span style="font-size: 12pt;"><b>DISPLAY</b>:2,63 inches; </span></p> <p><span style="font-size: 12pt;"><b>OTTURATORE</b>:1, 1/2000; </span></p> <p><span style="font-size: 12pt;"><b>MEMORIA</b>:7300 mb; </span></p> <p><span style="font-size: 12pt;"><b>REGISTRAZIONE</b>:Risoluzione Max Immagine Foto (Larghezza) : 4160 , Risoluzione Max Immagine Foto </span></p> <p><span style="font-size: 12pt;">(Altezza) : 3120 , Registrazione HD; </span></p> <p><span style="font-size: 12pt;"><b>CONNESSIONI</b>:Connessione HDMI; </span></p> <p><span style="font-size: 12pt;"><b>ALTRE CARATTERISTICHE</b>:Microfono Incorporato, Adattabilità Treppiedi Standard; </span></p> <p><span style="font-size: 12pt;"><b>PESI E MISURE</b>:Altezza : 5,13 cm, Larghezza : 7,71 cm, Profondità : 1,75 cm, 100 g; </span></p> <p><span style="font-size: 12pt;"><b>GARANZIA</b>: 24 mesi.</span></p> <p><br /><br /></p> <p><br /><br /><br /></p> [meta_description] => [meta_keyword] => NIKON COOLPIX S02 [tag] => [category_name] => Fotocamere [category_id] => 33 ) [2] => stdClass Object ( [product_id] => 92 [model] => 1FA6_002 [sku] => [upc] => [ean] => [jan] => [isbn] => [mpn] => [location] => [quantity] => 1 [stock_status_id] => 5 [image] => data/TOM_RG_216169_1FA4_002_02.jpg [manufacturer_id] => 0 [shipping] => 1 [price] => 259.0000 [points] => 0 [tax_class_id] => 0 [date_available] => 2014-07-22 [weight] => 0.00000000 [weight_class_id] => 1 [length] => 0.00000000 [width] => 0.00000000 [height] => 0.00000000 [length_class_id] => 1 [subtract] => 1 [minimum] => 1 [sort_order] => 1 [status] => 1 [date_added] => 2014-07-23 15:55:05 [date_modified] => 2014-07-23 15:58:36 [viewed] => 7 [language_id] => 2 [name] => TOM TOM GO 600 [description] => <p><span style="font-size: 14pt;"><b>SISTEMA GPS</b>:Auto; </span></p> <p><span style="font-size: 14pt;"><b>CARATTERISTICHE GENERALI</b>:Tom Tom, Italia, Austria - Svizzera - Germania, Francia, </span></p> <p><span style="font-size: 14pt;">Penisola Iberica, Regno Unito, Scandinavia, Paesi Est, Russia, Grecia, Major Roads Europe; </span></p> <p><span style="font-size: 14pt;"><b>SCHERMO</b>: 6 "Retroilluminazione, Visualizzazione 3D, 480 Pixels, Risoluzione Verticale 272, </span></p> <p><span style="font-size: 14pt;">Touchscreen; </span></p> <p><span style="font-size: 14pt;"><b>ESPANSIONE / CONNETTIVITÀ</b>:Canali : 12 , POI; </span></p> <p><span style="font-size: 14pt;"><b>CONNETTIVITÀ</b>:Bluetooth;</span></p> <p><span style="font-size: 14pt;"> <b>BATTERIA</b>:120 min; </span></p> <p><span style="font-size: 14pt;"><b>GARANZIA</b>: 24 mesi.</span></p> <p><br /><br /><br /><br /></p> [meta_description] => [meta_keyword] => TOM TOM GO 600 [tag] => [category_name] => Navigatori Satellitari [category_id] => 53 )