2026 년 4 월

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

 
그누스킨 그누소스 소스변경 소스문법 홈준비 기타
 
작성일 : 07-02-03 12:43
[소스문법] else
 글쓴이 : Morning (124.♡.110.84)
조회 : 3,970  
가끔은 특정 조건에 맞을때 구문을 수행하지 않고, 조건과 맞지 않을 때 다른 구문을 수행하게 하고 싶은 때가 있다. else 문은 이 목적을 위한 것이다. if문 다음의 else문은 if구문안의 표현식이 FALSE일때 수행된다. 예를 들면, 다음 코드는 $a가 $b보다 크다면 a는 b보다 크다 를 출력할것이고, 그렇지않다면 a는 b보다 크지 않다를 출력할것이다:


<?php
if ($a > $b) {
  echo "a는 b보다 크다";
} else {
  echo "a는 b보다 크지 않다";
}
?> 


else문은 if문이 FALSE일때만 수행이 된다. 그리고 그들 모두 FALSE값이 될수있다면 elseif문 을 쓸수 있다. (elseif를 참고)
주님과 함께 모닝커피를

 
 

Total 167
번호 제   목 글쓴이 날짜 조회
32 [소스문법] 제어 구조의 대체 문법 Morning 02-03 3916
31 [소스문법] elseif Morning 02-03 3706
30 [소스문법] else Morning 02-03 3971
29 [소스문법] if Morning 02-03 3827
28 [소스문법] for (1) Morning 02-03 3723
27 [그누소스] 검색창에 통합검색 셀렉트 박스를 넣는 방법 Morning 02-02 3988
26 [소스문법] 흐르는 글 Morning 01-31 3903
25 [소스문법] 보더를 이용해서 box 만들기 Morning 01-26 4971
24 [소스문법] A라면 A해라 Morning 01-22 3862
23 [소스문법] gd_gallery image resizing Morning 01-20 5182
22 [그누스킨] 다중게시판 Morning 01-18 3265
21 [그누스킨] morning_webzine1 Morning 01-17 3018
20 [그누스킨] morning_webzine2 Morning 01-14 3169
19 [그누스킨] morning_webzine Morning 01-14 3468
18 [소스문법] 여분필드에 기본값 입력하기 (1) Morning 01-14 4235
 1  2  3  4  5  6  7  8  9  10    

Therefore, holy brothers, who share in the heavenly calling,
fix your thoughts on Jesus, the apostle and high priest whom we confess.
Let us fix our eyes on Jesus, the author and perfecter of our faith,
who for the joy set before him endured the cross, scorning its shame,
and sat down at the right hand of the throne of God