-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElseif Statement in PHP.php
More file actions
55 lines (50 loc) · 983 Bytes
/
Elseif Statement in PHP.php
File metadata and controls
55 lines (50 loc) · 983 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!-- Elseif Statement -->
<!-- if(condition_1){
statement_bloack;// true vaya paxi print hunxa false vaya paxi next condition check grw xa
}
elseif(condition_2){
statement_bloack;
}
elseif(condition_n){
statement_n_block;
}
else
statement x;
2nd ex
if(condition_1):
statement_bloack;
elseif(condition_2):
statement_2_block;
elseif(condition_n):
statement_n_block;
else:
statements_x;
endif;
-->
<!-- example -->
<?php
$a =10;
if($a >10){
echo "condition 1 rrue";
}
elseif($a ==10){
echo "condition 2 True";
}
elseif($a !==10){
echo "condition 3 TRUE";
}
else{
echo"condition are false";
}
// example 2nd
$b =100;
if($b >10):
echo "condition 1 True";
elseif($b ==10):
echo "condition 2 True";
elseif($b !==10):
echo "condition 3 TRUE";
else:
echo"condition are false";
endif;
?>