latest.lib.php 수정할때 쪼갠 여분필드 사용가능한가요?

latest.lib.php 수정할때 쪼갠 여분필드 사용가능한가요?

QA

latest.lib.php 수정할때 쪼갠 여분필드 사용가능한가요?

답변 2

본문

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

함수안의 파라메터는 선언 값일 뿐입니다. 


$wr_1[0] = 1;
$wr_1[1] = 2;
latest_wr ($skin_dir, $bo_table, $rows, $subject_len, $options, $wr_1);

 

이렇게 사용하시면 됩니다.

 

 


function latest_wr ($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="", $wr_1="이름") {
// 여기 안에서 아래와 같이 사용하시면 배열 모두를 보낼수 있습니다.  
$a = $wr_1[0]; 
$b = $wr_1[1];
}

하나더 문의드립니다.

그럼 아래의 {$wr_1}  ---> {$wr_1[0]} 이렇게 사용되어야하나요?
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 and wr_1 = '{$wr_1}' order by wr_num limit 0, {$rows} "; 

 

$a = $wr_1[0];

$b = $wr_1[1];

 

 

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
  • 질문이 없습니다.
전체 0
© SIRSOFT
현재 페이지 제일 처음으로