Heim > Backend-Entwicklung > PHP-Tutorial > php-怎样删除二维数组中相同的一位数组 并保持相同键名 求大神写个函数

php-怎样删除二维数组中相同的一位数组 并保持相同键名 求大神写个函数

WBOY
Freigeben: 2016-06-02 11:34:00
Original
1113 Leute haben es durchsucht

php数组

Array
(
[0] => Array
(
[year] => 2013-2014
[term] => 1
[course_code] => 00008069
[course_name] => 咖啡世界
[course_nature] => 任意选修
[course_attribution] => 人文素养类
[credit] => 2.0
[point] => 4.1
[grade] => 91
[minor_tag] => 0
[makeup_grade] =>

[rebuild_grade] =>

[begin_college] => 旅游文化产业学院
[remark] =>

[rebuild_tag] => 0
[0] => 77
[1] => 2
)

<code>                    [1] => Array                            (                                    [year] => 2013-2014                                    [term] => 1                                    [course_code] => 00008069                                    [course_name] => 咖啡世界                                    [course_nature] => 任意选修                                    [course_attribution] => 人文素养类                                    [credit] => 2.0                                    [point] => 4.1                                    [grade] => 91                                    [minor_tag] => 0                                    [makeup_grade] =>                                      [rebuild_grade] =>                                      [begin_college] => 旅游文化产业学院                                    [remark] =>                                      [rebuild_tag] => 0                                    [0] => 77                                    [1] => 2                            )                    [2] => Array                            (                                    [year] => 2013-2014                                    [term] => 1                                    [course_code] => 00008069                                    [course_name] => 咖啡世界                                    [course_nature] => 任意选修                                    [course_attribution] => 人文素养类                                    [credit] => 2.0                                    [point] => 4.1                                    [grade] => 91                                    [minor_tag] => 0                                    [makeup_grade] =>                                      [rebuild_grade] =>                                      [begin_college] => 旅游文化产业学院                                    [remark] =>                                      [rebuild_tag] => 0                                    [0] => 77                                    [1] => 2                            )</code>
Nach dem Login kopieren

)

如上面 怎样让它变成
Array
(
[0] => Array
(
[year] => 2013-2014
[term] => 1
[course_code] => 00008069
[course_name] => 咖啡世界
[course_nature] => 任意选修
[course_attribution] => 人文素养类
[credit] => 2.0
[point] => 4.1
[grade] => 91
[minor_tag] => 0
[makeup_grade] =>

[rebuild_grade] =>

[begin_college] => 旅游文化产业学院
[remark] =>

[rebuild_tag] => 0
[0] => 77
[1] => 2
)
}

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage