How to remove duplicate values from an associative array based on a specific value?

前端 未结 5 1886
星月不相逢
星月不相逢 2020-12-20 01:53

I have an array that looks just like that:

array(3) { [\"fk_article_id\"]=> string(1) \"4\" [\"first_name\"]=> string(6) \"Ulrike\" [\"last_name\"]=>         


        
5条回答
  •  半阙折子戏
    2020-12-20 02:30

    One way would be to iterate over the array, copying ownly the first instance of each fk_article_id in a new array.

提交回复
热议问题