{@
$output = executeQueryArray('comment.getNewestCommentList',$args);
};
$ouput에 배열로 여러가지 값이 담겨 있는데요.
comment_srl 값만
$last_srl 에 넣어주고 싶습니다.
*list_count 를 1로 해서 쿼리해 댓글 1개의 정보를 가져옵니다.
{@
$output = executeQueryArray('comment.getNewestCommentList',$args);
};
$ouput에 배열로 여러가지 값이 담겨 있는데요.
comment_srl 값만
$last_srl 에 넣어주고 싶습니다.
*list_count 를 1로 해서 쿼리해 댓글 1개의 정보를 가져옵니다.
댓글 5
{@ $last_srl = ($val->comment_srl);}
{$last_srl}
</span>
이렇게 출력해보니 값이 잘 출력이 되는데 이렇게 써도 되는 건지 모르겠네요.
$output->data 값이 array의 배열일경우
$lastData = end($output->data);
$last_srl = $lastData->comment_srl;
이렇게 해보세요.
예전에 제가 물어본 질문중에 기진님께서 친절하게 답변해주신 내용입니다ㅋㅋ