mercredi 6 novembre 2019

Why PHP multiple AND conditions inside if statement not working?

I have a few if statements which contains multiple conditions inside, for example:

if (
    $row4['receive_fixed_client'] == '1' && 
    $row4['received_manufacturer'] == '1' &&
    $row4['receive_fixed_client'] == '1' &&
    $row4['ship_back_to_client'] == '1'
) {
    echo "Device has been received by client.";
}

for some reasons this doesnt work and I would really like to know why and how can I make it work. Before coming here I searched for this and I think I am doing it correct but I have no idea why is it not working. P.S. it works with a single condition.

Aucun commentaire:

Enregistrer un commentaire