Welcome Guest, Not a member yet? Register   Sign In
finding value of next element in an array
#5

[eluser]vtatds[/eluser]
I kinda see where you're going with this:
Code:
(isset($result[$key+1]) && $result[$key] == $result[$key+1])
however, i get an error (which i can't see for some reason, the page just doesn't process). when i comment out the if structure and just output the $key and $result->activity_name though. i just get the position of the element in the array and the activity_name.

I'm trying to check if that current activity_name and the next activity_name are the same. not sure what i'm missing.


Messages In This Thread
finding value of next element in an array - by El Forum - 09-08-2010, 08:59 PM
finding value of next element in an array - by El Forum - 09-09-2010, 01:02 AM
finding value of next element in an array - by El Forum - 09-09-2010, 01:08 AM
finding value of next element in an array - by El Forum - 09-09-2010, 09:09 AM
finding value of next element in an array - by El Forum - 09-09-2010, 09:42 AM
finding value of next element in an array - by El Forum - 09-09-2010, 11:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB