묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
변수 출력 질문드립니다. ㅠ_ㅠ
2014.10.05 20:06
완전 초보인데요,
<!--?php print_r(Context::getAll()); ?--> 이렇게 모든 변수를 출력하면..
아래처럼 내용들이 출력되는데요..
| [category] => Array | |
| ( | |
| [0] => Array | |
| ( | |
| [node_srl] => 905 | |
| [parent_srl] => 0 | |
| [menu_name_key] => 플래시게임 | |
| [isShow] => 1 | |
| [text] => 플래시게임 | |
| [href] => http://www.***.com/index.php?mid=board_flashgame | |
| [url] => board_flashgame | |
| [is_shortcut] => N | |
| [open_window] => N | |
| [normal_btn] => | |
| [hover_btn] => | |
| [active_btn] => | |
| [selected] => 1 | |
| [expand] => N | |
| [list] => Array | |
| ( | |
| ) | |
| [link] => 플래시게임 | |
| ) | |
| ) | |
| [selected] => Array | |
| ( | |
| [node_srl] => 905 | |
| [parent_srl] => 0 | |
| [menu_name_key] => 플래시게임 | |
| [isShow] => 1 | |
| [text] => 플래시게임 | |
| [href] => http://www.***.com/index.php?mid=board_flashgame | |
| [url] => board_flashgame | |
| [is_shortcut] => N | |
| [open_window] => N | |
| [normal_btn] => | |
| [hover_btn] => | |
| [active_btn] => | |
| [selected] => 1 | |
| [expand] => N | |
| [list] => Array | |
| ( | |
| ) | |
| [link] => 플래시게임 | |
| ) | |
| ) |
category 의 text 를 출력할려면
{$category->text } 혹은
{$category[0]->text } 이렇게 해봤는데..
도무지 출력이 안되네요..
이유가 뭔가요?
좀 알려주실분 ㅠㅠ
댓글 3
-
Hello_XE
2014.10.05 20:28
-
마르코판다
2014.10.05 21:52
아 감사합니다.
보니까 [0][0]은 안되는 듯 하네요 ㅠㅠ
$category[0]["변수"] 이렇게 하니까 출력된 것 같아요.
-
마르코판다
2014.10.05 21:54
혹시..몰라서 여쭙습니다만..
[category] => Array ( [0] => Array ( [node_srl] => 905 [parent_srl] => 0 [menu_name_key] => 플래시게임 [isShow] => 1 [text] => 플래시게임 [href] => http://www.***.com/index.php?mid=board_flashgame [url] => board_flashgame [is_shortcut] => N [open_window] => N [normal_btn] => [hover_btn] => [active_btn] => [selected] => 1 [expand] => N [list] => Array ( )
이걸 가져오려면 어떤 명령어를 사용해야 할까요?
<!--?php print_r(Context::getAll()); ?--> 이게 위치에 따라서 카테고리가 나오는 곳이 있고 안나오는 곳이 있더라구요.
카테고리 배열변수만 따로 받으려면 어떻게 해야 되는지 아시는분 없을가요 ㅠ
테스트는 안해봤지만 혹시 몰라 적어봅니다.
{$category[0][0]->text }