if statement - php Using if is not changing? -
this question has answer here:
- reference — symbol mean in php? 15 answers
if $status
= pending
or success
result warning. how possible? using else
right? maybe can me it. $status
coming database. can explain whats difference between =
, ==
?
thanks sincerely dennis
<?php if ($status == "pending") { $class ="warning"; } else if ($status == "succes"){ $class = "succes"; } ?>
to answer 2nd question:
single = asigning value variable.
variable = "test"
double == comparing
1 == 1 // true
Comments
Post a Comment