luminous Posted May 15, 2010 Share Posted May 15, 2010 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 :'( Link to comment https://forums.phpfreaks.com/topic/201901-array-function-to-find-only-value-in-array/ Share on other sites More sharing options...
JAY6390 Posted May 16, 2010 Share Posted May 16, 2010 This should be what you need http://uk.php.net/manual/en/function.array-count-values.php Link to comment https://forums.phpfreaks.com/topic/201901-array-function-to-find-only-value-in-array/#findComment-1058960 Share on other sites More sharing options...
luminous Posted May 16, 2010 Author Share Posted May 16, 2010 splendid i think i can work with this, thankyou! Link to comment https://forums.phpfreaks.com/topic/201901-array-function-to-find-only-value-in-array/#findComment-1058962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.