Kasuke_Akira Posted March 23, 2007 Share Posted March 23, 2007 How would i grab the first value [0] in an array, check to see if any value after it[1][..] is the same, and then move to the next one[1], checking if to see if any value after that one [2][..] is the same? Link to comment https://forums.phpfreaks.com/topic/43936-solved-array-comparison/ Share on other sites More sharing options...
per1os Posted March 23, 2007 Share Posted March 23, 2007 foreach ($array as $val) { if (array_search($oldVal, $val)) print "Same"; $oldVal = $val; } http://us3.php.net/manual/en/function.array-search.php Link to comment https://forums.phpfreaks.com/topic/43936-solved-array-comparison/#findComment-213482 Share on other sites More sharing options...
Kasuke_Akira Posted March 23, 2007 Author Share Posted March 23, 2007 haha feel stupid..thanks Link to comment https://forums.phpfreaks.com/topic/43936-solved-array-comparison/#findComment-213593 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.