I have constructed an aray with x values, how can I check if all values are the same? I want to check if or if not values are same and get the appropriate message...
Thx in advance
vincevincevince
3:09 pm on Dec 13, 2005 (gmt 0)
Assuming $array[0] is the first element of the array:
foreach ($array as $a) if ($a!=$array[0]) {print "Not all the same"; exit();}