리스트에서 옵션 나타내기 문의 정보
리스트에서 옵션 나타내기 문의본문
입력한 전화번호를 리스트에서 나타내려고 하는데 나오지를 않습니다.
짧은 지식으로는 뭐가 문제인지 알수가 없네요. 도움 부탁드립니다.
<!-- [참고] 옵션필드 --//-->
<?
$ex5_filed = explode("|",$list[$i][wr_5]); //전화,휴대폰
$list_TEL = $ex5_filed[0] ."-". $ex5_filed[1] ."-".$ex5_filed[2];
$view_HP = $ex5_filed[3] ."-". $ex5_filed[4] ."-".$ex5_filed[5];
?>
<span style='color:888888'>[전화] </span>
<?echo $list_TEL;?>
이렇게 하면 아래처럼 나옵니다.
[전화] --
짧은 지식으로는 뭐가 문제인지 알수가 없네요. 도움 부탁드립니다.
<!-- [참고] 옵션필드 --//-->
<?
$ex5_filed = explode("|",$list[$i][wr_5]); //전화,휴대폰
$list_TEL = $ex5_filed[0] ."-". $ex5_filed[1] ."-".$ex5_filed[2];
$view_HP = $ex5_filed[3] ."-". $ex5_filed[4] ."-".$ex5_filed[5];
?>
<span style='color:888888'>[전화] </span>
<?echo $list_TEL;?>
이렇게 하면 아래처럼 나옵니다.
[전화] --
댓글 전체
-- <-- 이게 나온걸 보면
$list_TEL = $ex5_filed[0] ."-". $ex5_filed[1] ."-".$ex5_filed[2];
이 적용 되었는데
$list[$i][wr_5]값이 제대로 저장되었는지 확인해보시는게..
$list_TEL = $ex5_filed[0] ."-". $ex5_filed[1] ."-".$ex5_filed[2];
이 적용 되었는데
$list[$i][wr_5]값이 제대로 저장되었는지 확인해보시는게..

아래 코드로 변수의 값을 다시한번 확인해보시기 바랍니다.
$ex5_filed = explode("|",$list[$i][wr_5]); //전화,휴대폰
print_r($list[$i][wr_5]);
print_r($ex5_filed);
$ex5_filed = explode("|",$list[$i][wr_5]); //전화,휴대폰
print_r($list[$i][wr_5]);
print_r($ex5_filed);
두 분 감사드립니다. 제대로 저장되어 있긴 하구요.
곱슬최씨님 말씀대로 했더니 이렇게 나오네요
[전화] 02|xxxx|xxxx|011|xxxx|xxxx1 Array ( [0] => ) 1
곱슬최씨님 말씀대로 했더니 이렇게 나오네요
[전화] 02|xxxx|xxxx|011|xxxx|xxxx1 Array ( [0] => ) 1