Matty Matty - 1 year ago 67
PHP Question

PHP: Testing whether three variables are equal

I've never come across this before, but how would you test whether three variables are the same? The following, obviously doesn't work but I can't think of an elegant (and correct) way to write the following:

if ($select_above_average === $select_average === $select_below_average) { }

Answer Source
if ((a == b) && (b == c)) {
   ... they're all equal ...

by the transitive relation

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download