Jump to content

Array function to find only value in array?


luminous

Recommended Posts

Hi,

 

I'm looking to see if there's an array function or method I can use to see if an array contains only one integer value. For example:

 

Go through the array, if the array only contains the value 8 or multiple instances of the value 8:: do this

else

Go through the array, if the array contains the value 8 or  multiple instances of the value 8 AND ANY OTHER NUMBER:: do something

 

I've been working with 'in_array' but can seem to get the result I'm after  :'(

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.