승인보류를 넣으려면 코드를 어떻게 수정해야할까요?
본문
글쓰기에서는 옵션을 추가해서 승인보류를 넣었는데
리스트에서 승인보류를 넣으려니 추가가 안되서요.
<span class=" <?php echo ($list[$i]['wr_2']=="승인완료" ? 'txt_done' : 'txt_rdy'); ?>">
<?php echo ($list[$i]['wr_2']=="승인완료" ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 승인완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> 접수'); ?></span>
::도 넣어보고 ||도 넣어보고 |도 넣어봤는데 다 실패했습니다ㅠ
이 코드를 어떻게 수정해야 승인보류가 뜰까요?
답변 1
승인보류를 접수와 동일한 모양으로 하신다면 아래와 같이 하면 됩니다.
<span class=" <?php echo ($list[$i]['wr_2']=="승인완료" ? 'txt_done' : 'txt_rdy'); ?>">
<?php echo ($list[$i]['wr_2']=="승인완료" ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 승인완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> '.$list[$i]['wr_2']); ?></span>
답변을 작성하시기 전에 로그인 해주세요.