답변 1개 / 댓글 3개
채택된 답변
+20 포인트
답변에 대한 댓글 3개
<?php
// 구조만 참고 하세요
class st {
var $theme;
function __construct() {
$this->theme = new theme;
}
}
class theme {
var $st_sidebar_banner_count = 10;
function get($cnt) {
return $this->$cnt;
}
}
$ST = new st;
for($i=1; $i<=$ST->theme->get('st_sidebar_banner_count'); $i++) {
echo $i . '<br>';
}
?>
// 구조만 참고 하세요
class st {
var $theme;
function __construct() {
$this->theme = new theme;
}
}
class theme {
var $st_sidebar_banner_count = 10;
function get($cnt) {
return $this->$cnt;
}
}
$ST = new st;
for($i=1; $i<=$ST->theme->get('st_sidebar_banner_count'); $i++) {
echo $i . '<br>';
}
?>
답변을 작성하려면 로그인이 필요합니다.