list.skin.php에서 채택완료
초보엄마
8년 전
조회 2,412
wr_1안에
$ex1_filed = explode("|",$list[$i][wr_1]);
$ext1_00 = $ex1_filed[0];
$ext1_01 = $ex1_filed[1];
$ext1_02 = $ex1_filed[2];
?>
이런식으로 내용이 나눠서 디비에 들어가게 했는데요....
리스트에 $ext1_01 값이 나오게 하려면 어떡해 해야하는거에요?
이런식으로 출력했더니 아무것도 안나오고...
로 출력하면 $ext1_00, $ext1_01, $ext1_02 값이 모두나와서요....
$ext1_01 값만 출력하고 싶으면 어떡해하는지 알려주시면 감사하겠습니다....
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
8년 전
list.skin.php 파일에보면
for문이있습니다
for문 아래 explode를 넣으세요
예를들어 이렇게요
</p><p> <?php</p><p> for ($i=0; $i<count($list); $i++) {</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$ex1_filed = explode("|",$list[$i]['wr_1']); </p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$ext1_00 = $ex1_filed[0];</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$ext1_01 = $ex1_filed[1];</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$ext1_02 = $ex1_filed[2];</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>echo $ext1_00;</p><p> ?></p><p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
8년 전
?php echo $list[$i]['wr_1'] ?> 로 출력하면 $ext1_00, $ext1_01, $ext1_02 값이 모두나와서요...
이 부분에.문제의.답이.있는.듯.합니다
출력 결과물이.콤마로 되어 있으니.아래 코드처람.변경.하시면.원하시는 결과가 나올듯 하네요
?
$ex1_filed = explode(",",$list[$i][wr_1]); // 출력물에서 . 콤마로 되어 있습니다
$ext1_00 = $ex1_filed[0];
$ext1_01 = $ex1_filed[1];
$ext1_02 = $ex1_filed[2];
?>
이 부분에.문제의.답이.있는.듯.합니다
출력 결과물이.콤마로 되어 있으니.아래 코드처람.변경.하시면.원하시는 결과가 나올듯 하네요
?
$ex1_filed = explode(",",$list[$i][wr_1]); // 출력물에서 . 콤마로 되어 있습니다
$ext1_00 = $ex1_filed[0];
$ext1_01 = $ex1_filed[1];
$ext1_02 = $ex1_filed[2];
?>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인