How to compare Array index according to button tag?
<pre><code>indexpath.row for array                          b.tag

0 Date1                                          0
1 india                                          1
2 pakistan                                       2
3 Date2                                          3
4 Zimbabwe                                       3
5 England                                        4
6 Date3                                          6
7 Australia                                      5
8 Westindes                                      6
9 Date3                                          9
10 Shrilanka                                     7
11 southAfrica                                   8
</code></pre>

<p>Here, indexpath.row for array is my Array. Now when i click on <code>b.tag=3</code> then I want to display Array index 4th value i.e Zimbabwe and not the Date2 which is on array index 3. Similarly, for b.tag=6 and b.tag=9. For that following is the code that i have written.</p>

<p>please take a look...</p>

<pre><code>if (b.tag!=[arr objectAtIndex:path])
{
   NSLog(@"Team name %@",[arr objectAtIndex:b.tag]);
}
</code></pre>

<p>From the above code my first record result is coming right i.e of b.tag=1 and b.tag=2,but not for others because my Array index and b.tag are different. So please help me out of this.</p>

<p>Any help will be appreciated.</p>

<p>Thanks in Advance.</p>
