I have a random array of thousands of geometric shapes. On my PHP page, if I form-submit the number "8," my PHP code will select 8 shapes at random from the array, like this:
triangle
triangle
square
circle
square
hexagon
hexagon
circle
If I were to form-submit the number "3," my PHP code will give me 3 shapes like this example:
circle
square
square
How do I set up an "alert" in my PHP code, so that if all the shapes are the same, I'll get an "alert?"
Example 1:
square
square
square
square
square
square
square
triangle
square
square
// NO alert -- (one of the shapes is different)
Example 2:
circle
circle
circle
circle
// ALERT: WOW ALL 4 SHAPES ALL THE SAME!
Thank you!! 🙂