+ 2
What is the difference between => and >=?
read the above
2 Antworten
+ 10
$a = 5;
$b = 4;
if ($a >= $b){
echo '$a is GREATER THAN OR EQUAL TO $b';
}else {
echo '$a is LESS THAN $b';
}
In this case $a is greater than $b. This >= means GREATER OR EQUAL TO, and the opposite means <= LESS THAN OR EQUAL TO. You've got to pay attention to the operands being compared. In my example it checks to see if $a is greater or equal to the operand $b on the right, and it is so it will be true echoing:
$a is GREATER THAN OR EQUAL TO $b
+ 4
=> is used for associative arrays,
>= is used for comparison