Jabop Posted April 20, 2008 Share Posted April 20, 2008 Currently I'm using in_array, but I was wondering if there was a better way to compare a value of a string to *ANY* value of an array. Could anyone share some ideas? Link to comment https://forums.phpfreaks.com/topic/101944-best-way-to-compare-values-in-an-array/ Share on other sites More sharing options...
AP81 Posted April 20, 2008 Share Posted April 20, 2008 in_array should be ample. There isn't any built in functions that will be more efficient than in_array. Link to comment https://forums.phpfreaks.com/topic/101944-best-way-to-compare-values-in-an-array/#findComment-521726 Share on other sites More sharing options...
p2grace Posted April 20, 2008 Share Posted April 20, 2008 What other feature would you want? in_array does exactly what you're trying to accomplish doesn't it? Link to comment https://forums.phpfreaks.com/topic/101944-best-way-to-compare-values-in-an-array/#findComment-521730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.