php - Check if all values in array are the same - Stack Overflow

PHOTO EMBED

Tue Sep 14 2021 20:54:44 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

if (array_unique($allvalues) === array('foobar')) { 
   // all values in array are "foobar"
}
content_copyCOPY

https://stackoverflow.com/questions/10560658/check-if-all-values-in-array-are-the-same