<? if($list[$i][wr_1] ){ echo "<img src='../skin/board/test/img/camera.png'>"; } ?>
이렇게 이미지를 출력하려는데요,,,
문제는 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_03 = $ex1_filed[3];
이렇게요,,
그래서인지 값이 없어도 출려되어 버리네요,,,
어떻게 해야 할지요,,도움부탁드려요~
|
답변 1개 / 댓글 1개
채택된 답변
+20 포인트
2017-06-07 (수) 16:24:55
<?
$list[$i][wr_1] = str_replace("|", "", $list[$i][wr_1]); // 분할값 제외
$list[$i][wr_1] = trim($list[$i][wr_1]); // 공백제외
?>
<? if($list[$i][wr_1] ){ echo "<img src='../skin/board/test/img/camera.png'>"; } ?>
이렇게 하시면 될거 같네요.
답변에 대한 댓글 1개
민쯩먼저깔게요
2017-06-07 (수) 16:27:30
답변을 작성하려면 로그인이 필요합니다.
진심 감사드려요~