I'm new to PHP so this might be a dumb question. I'm not sure how to name it or whether you can even do something like that but I have been wondering if I could see and change what variable triggers "if" statement.
For example if I have such code:
if ($a == 1 || $b == 1 || $c == 1) {
//find which variable has triggered it and change only this variable to something else, (leave other untouched)
$this = 2;
}
or do I have to do a separate if statement for each variable?
Cheers
Aucun commentaire:
Enregistrer un commentaire