I'm trying to recognize when a record in my BD does not match a word.
I have the following code that works well when $ client is equal to Day , but does not work if $ client equals day
elseif (strpos($cliente, 'Dia') !== false or strpos($cliente, 'plaza') !== false) {
echo "background:#c31434;";
}
I tried to do it the other way around and it does not work either
elseif (strpos($cliente, 'Dia') == true or strpos($cliente, 'plaza') == true) {
echo "background:#c31434;";
}
I have also tried to do it like @Hector Lopez says in this way, and it does not work the same as in the case above.
elseif ($cliente == 'dia' || $cliente == 'plaza') {
echo "background:#c31434;";
}
This is my complete if
<?php if(strpos($cliente, 'Lupa') !== false or strpos($cliente, 'lupa') !== false or strpos($cliente, 'Tifer') !== false){
echo "background:#1474c3;";
}
elseif ($cliente =='dia' || $cliente =='plaza') {
echo "background:#c31434;";
}
else{
echo "background:#778998;";
};