Link to home
Start Free TrialLog in
Avatar of mnb93
mnb93

asked on

A Function to do....

I  need a function that:

Checks to see if every value is the same. (excluding 0's( eg. 1,1,1,0 are the same.))-> Returns the "same value" (eg. 1)
Else outputs false

Thanks.
Avatar of WaielEid
WaielEid

what are the arguments and of what type ?!
Avatar of mnb93

ASKER

Sorry, args:
($array) (Type is Array)
ASKER CERTIFIED SOLUTION
Avatar of OneNineEightNine
OneNineEightNine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can use any of the Array function the PHP provides like:
array_diff, array_intersect, array_search, array_unique, in_array