开发者

remove duplicate values from a multidimensional arrays in php

hi this is my array , i need to remove duplicating values , please hekp me out

Array ( [0] => Array ( [0] =>

    * garfield calicut
      Address: tanil nadu chennai0696955666
      About Company: re stored.


[1] => 0.0004 [2] => 0 ) [1] => Array ( [0] =>

    * gamut
      Address: ashok puram calicut9865326921
      About Company: You've come.


    * garfield calicut
      Address: tanil nadu chennai0696955666
      About Company: re stored.


    * Hyva It Solutions
      Address: 697 / 75,30th Cross
      About Company: Hyva IT Solutions.


    * streem pvt Ltd
      Address: onden road kannur9845672062
      About Company: Go to the website 


    * Advanced It Wave
      Address: Ayyappankavu, Ernakulam (North), 
      About Company: Website Deve开发者_高级运维lopement Services


    * Viral Industry
      Address: vettiyar, kodam p o tramp8469666663
      About Company: # for discussion 

[1] => 0.0008 [2] => 0 ) [2] => Array ( [0] => company [1] => 0.0007 [2] => 1 ) )

here 'garfield calicut Address: tanil nadu chennai0696955666 About Company: re stored. ' is repeated , i need to display that only once


If you flatten your array into an array that only contains addreses you could always use

$addresses = array("street a', 'street b', 'street a'); // 3 elements
$addresses = array_unique($addresses); // remove duplicates
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜