채택완료
latest.lib.php 수정할때 쪼갠 여분필드 사용가능한가요?
function latest_wr ($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="", $wr_1="이름") {
------------------------------------------------------
윗소스에서
아래처럼 쪼갠 필드로 가능한가요?
function latest_wr ($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="", $wr_1[0]="이름") {
|
답변 2개 / 댓글 1개
채택된 답변
+20 포인트
함수안의 파라메터는 선언 값일 뿐입니다.
Copy
$wr_1[0] = 1;
$wr_1[1] = 2;
latest_wr ($skin_dir, $bo_table, $rows, $subject_len, $options, $wr_1);
이렇게 사용하시면 됩니다.
Copy
function latest_wr ($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="", $wr_1="이름") {
// 여기 안에서 아래와 같이 사용하시면 배열 모두를 보낼수 있습니다.
$a = $wr_1[0];
$b = $wr_1[1];
}
답변을 작성하려면 로그인이 필요합니다.
한 번 시도해 보겠습니다.~~~^^