연락처를 wr_4 필드에 아래와 같이 확장해서 입력받았습니다.
Copy
?> $ex4_filed = explode("|",$view[wr_4]); $ext4_00 = $ex4_filed[0];$ext4_01 = $ex4_filed[1];$ext4_02 = $ex4_filed[2];$ext4_03 = $ex4_filed[3];$ext4_04 = $ex4_filed[4];?>
리스트에서 연락처를 출력하고 싶은데 아래와 같이 해도 출력이 안됩니다.
뭘 빼먹은건가요? 도움요청드립니다.
Copy
<? echo $ext4_02.$ext4_03.$ext4_04; ?>
답변 5개
채택된 답변
+20 포인트
PHPㅡASP프로그래머
10년 전
1 | <? |
2 | $ex4_filed = explode("|",$list[$i]['wr_4']); |
3 | $ext4_00 = $ex4_filed[0]; |
4 | $ext4_01 = $ex4_filed[1]; |
5 | $ext4_02 = $ex4_filed[2]; |
6 | $ext4_03 = $ex4_filed[3]; |
7 | $ext4_04 = $ex4_filed[4]; |
8 | ?> |
위 코드로 수정해 보세요.
echo $list[$i]['wr_4'];
로 어떤 값이 출력되는지 확인해 보시고요.
10년 전
echo $list[$i]['wr_4']; 이렇게했더니...
회원정보가 다나와요...
$ext4_02,$ext4_03,$ext4_04가 각각 핸드폰 첫번째,중간,끝번호라
wr_4에서도 저 3개만 출력해야합니다.
view에서 출력할때는
<? if ($member[mb_id]) {
echo $ext4_02."-".$ext4_03."-".$ext4_04;
}
?>
이렇게 하니까 잘 출력되거든요....
list에서 어떻게 출력해야할까요.ㅠ.
10년 전
$ex4_filed = explode("|",$list[$i][wr_4]); |
3 | $ext4_00 = $ex4_filed[0]; |
4 | $ext4_01 = $ex4_filed[1]; |
5 | $ext4_02 = $ex4_filed[2]; |
6 | $ext4_03 = $ex4_filed[3]; |
7 | $ext4_04 = $ex4_filed[4]; |
10년 전
위에 소스는 write에 삽입된 소스이에요.
list에서 확장필드를 출력할 수 있는 방법이 궁금합니다
10년 전
리스트면 $view['wr_4']가 아니라 $list[$i]['wr_4']가 맞을 것 같네요.
답변을 작성하려면 로그인이 필요합니다.