간단한 함수입니다. 도움 부탁드려요! 채택완료
온비
3년 전
조회 1,631
</p>
<p> <?php
if ($list[$i]['wr_datetime']==$list[$i]['wr_last'])
echo '';</p>
<p> else
echo "<span class=\"qna_cmt_no\">수정일</span>";</p>
<p> ?></p>
<p>
</p>
<p> <?php
if ($list[$i]['wr_datetime']==$list[$i]['wr_last'])
echo '';</p>
<p> else
echo date("Y.m.d H:i", strtotime($list[$i]['wr_last']))</p>
<p> ?></p>
<p>
위 두개를 하나로 합치려 하는데.. 배워본적이 없어가지고 도저히 모르겠습니다.
두개는 else echo만 다르고 전부 같습니다.
도움 부탁드립니다.
댓글을 작성하려면 로그인이 필요합니다.
답변 2개
채택된 답변
+20 포인트
3년 전
else echo 부분을 이렇게..
echo "수정일 ".date("Y.m.d H:i", strtotime($list[$i]['wr_last']));
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
온비
3년 전
�
엑스엠엘
3년 전
<?php
if ($list[$i]['wr_datetime']!=$list[$i]['wr_last']) {
echo "<span class=\"qna_cmt_no\">수정일</span>",
date("Y.m.d H:i", strtotime($list[$i]['wr_last']));
}
?>
if ($list[$i]['wr_datetime']!=$list[$i]['wr_last']) {
echo "<span class=\"qna_cmt_no\">수정일</span>",
date("Y.m.d H:i", strtotime($list[$i]['wr_last']));
}
?>
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
진작 물어볼껄 한참 고생했네요 ^^;
감사합니다. ㅎㅎ