if statement - php Using if is not changing? -


this question has answer here:

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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -