답변 1개
채택된 답변
+20 포인트
10년 전
</p><p>if($list[$i]['wr_1']=='a') { </p><p>echo "1";</p><p>} elseif(<span style="font-size: 10pt; line-height: 1.5;">$list[$i]['wr_1']</span><span style="font-size: 10pt; line-height: 1.5;">=='b') {</span></p><p><span style="font-size: 10pt; line-height: 1.5;">echo "2";</span></p><p><span style="font-size: 10pt; line-height: 1.5;">} elseif(</span><span style="font-size: 10pt; line-height: 1.5;">$list[$i]['wr_1']=='c') {</span></p><p><span style="font-size: 10pt; line-height: 1.5;">echo "3";</span></p><p><span style="font-size: 10pt; line-height: 1.5;">} elseif(</span><span style="font-size: 10pt; line-height: 1.5;">$list[$i]['wr_1']</span><span style="font-size: 10pt; line-height: 1.5;">=='d') {</span></p><p><span style="font-size: 10pt; line-height: 1.5;">echo "4";</span></p><p><span style="font-size: 10pt; line-height: 1.5;">} elseif(</span><span style="font-size: 10pt; line-height: 1.5;">$list[$i]['wr_1']</span><span style="font-size: 10pt; line-height: 1.5;">=='e') {</span></p><p><span style="font-size: 10pt; line-height: 1.5;">echo "5";</span></p><p><span style="font-size: 10pt; line-height: 1.5;">} else {</span></p><p><span style="font-size: 10pt; line-height: 1.5;">echo "6";</span></p><p><span style="font-size: 10pt; line-height: 1.5;">}</span></p><p>
짧게 하는 방법도 있을텐데 저는 모르겠네요.
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
너모야민쯩까
10년 전
잘됩니다. 감사합니다~ 꾸벅
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인