首頁  >  文章  >  後端開發  >  PHP的排列组合有关问题

PHP的排列组合有关问题

WBOY
WBOY原創
2016-06-13 12:42:491097瀏覽

PHP的排列组合问题
现有数组$arr = array('Area','Income','Age','Gender');
想根据以上数组里的元素,组成新的数组如下:
Area Gender Income Age
Area Gender Age Income
Area Income Gender Age
Area Income Age Gender
Area Age Gender Income
Area Age Income Gender
Gender Income Age Area
Gender Income Area Age
Gender Age Area Income
Gender Age Income Area
Gender Area Age Income
Gender Area Income Age
Income Age Gender Area
Income Age Area Gender
Income Area Gender Age
Income Area Age Gender
Income Gender Area Age
Income Gender Age Area
Age Income Area Gender
Age Income Gender Area
Age Area Gender Income
Age Area Income Gender
Age Gender Area Income
Age Gender Income Area
希望各位大神能提供好的算法

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn