-1
我想通過e.g [SUBJECT_CODE] => 05
拆分陣列成兩個陣列按值的偶數或奇數5
Array
(
[0] => Array
(
[0] => English
[subject_name] => English
[1] => E-I
[subject_abr] => E-I
[2] =>
[ENROL_NO] =>
[3] => 2013
[YEAR_] => 2013
[4] => 1
[EXAM_CODE] => 1
[5] => 42701
[ROLL_NO] => 42701
[6] => 01
[SUBJECT_CODE] => 01
)
[1] => Array
(
[0] => English
[subject_name] => English
[1] => E-II
[subject_abr] => E-II
[2] => 027-B/FMSGUK-2011
[ENROL_NO] => 027-B/FMSGUK-2011
[3] => 2013
[YEAR_] => 2013
[4] => 1
[EXAM_CODE] => 1
[5] => 42701
[ROLL_NO] => 42701
[6] => 02
[SUBJECT_CODE] => 02
)
[2] => Array
(
[0] => Urdu
[subject_name] => Urdu
[1] => U-I
[subject_abr] => U-I
[2] =>
[ENROL_NO] =>
[3] => 2013
[YEAR_] => 2013
[4] => 1
[EXAM_CODE] => 1
[5] => 42701
[ROLL_NO] => 42701
[6] => 05
[SUBJECT_CODE] => 05
)
)
謝謝你的反應,謝謝你的答覆...哪裏將是新的價值存儲奇數和偶數...我是新來的php請幫助 – user3717373
@ user3717373所有值有奇怪的主題代碼應該在'new_values ['odd']'內,而在本例中甚至應該在'new_values ['even']'內。 – user1978142
非常感謝:x .... – user3717373