7
아래에 다차원 배열이 있는데이 루프를 반복하여 [menu_cats] 값을 숫자에서 데이터베이스 선택에서 가져온 문자열로 변경하고 싶습니다. 이것이 가능한가? 배열의 이름은 '결과'입니다.다차원 배열을 통한 PHP 루프 및 값 변경
Array
(
[0] => Array
(
[0] => Array
(
[menu_cats] => 1
[item] => Introduction
[link] => needs
)
[1] => Array
(
[menu_cats] => 1
[item] => Needs Assessment
[link] => needs/needs.php
)
)
[1] => Array
(
[0] => Array
(
[menu_cats] => 2
[item] => Introduction
[link] => knowledge
)
[1] => Array
(
[menu_cats] => 2
[item] => Administer Knowledge Pre-Test
[link] => knowledge/pre_test.php
)
)
)
딱! 고맙습니다! – stevenpepe
하나 이상의 레벨에서 작동하는 것보다 재귀적인 느낌을주는 것이 좋을까요? – gagarine