테스트 사이트 - 개발 중인 베타 버전입니다

필드 쪼갠 데이터 불러오기 채택완료

delpino 8년 전 조회 5,141

write.skin.php에서 필드를

 

$customer_content = explode("|",$write[wr_content]);
$customer_ceo  = $customer_content[0];
$customer_type  = $customer_content[1];
$customer_item  = $customer_content[2];

...으로 쪼갠 후 저장한 데이터를

 

list.skin.php에서 불러오려면 어떻게 해야하나요??

 

예를들어 list.skin.php에서 $customer_type을 불러올 때입니다. 

댓글을 작성하려면 로그인이 필요합니다.

답변 3개

채택된 답변
+20 포인트
그누위즈

list.skin.php 파일의

for($i)라고 되어있는 for문 안에 넣으면됨..

 

$customer_content = explode("|",$list[$i][wr_content]);
$customer_ceo  = $customer_content[0];
$customer_type  = $customer_content[1];
$customer_item  = $customer_content[2]; 

 

echo $customer_ceo;

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

8년 전

블랙캣님 답변이 정답입니다

for ~~~{

 

list($ceo, $type, $item) = explode("|",$list[$i][wr_content]); 

echo  $type;

 

 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

8년 전

쓰신거랑 동일하게 하고

$write를 $list[$i]로 변경하시면 되는거 아닌가요?

그게 아니라면 좀더 상세한 설명이 필요할거 같네요

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인