# compare multidimensional array values

Page 1 of 1

## 1 Replies - 1374 Views - Last Post: 02 February 2013 - 12:07 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=310838&amp;s=43f5bebee0923d37314bc2d187fef780&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 paipallecode

• New D.I.C Head

Reputation: 0
• Posts: 1
• Joined: 01-February 13

# compare multidimensional array values

Posted 01 February 2013 - 06:29 PM

I have multidimensional array.

``` Array (4)
0 => Array (6)
0 => 0
1 => "100100105"
2 => "honey"
3 => "SUP"
4 => 0
5 => 0
1 => Array (6)
0 => 1
1 => "100100608"
2 => "bunny"
3 => "MEM"
4 => 0
5 => 0
2 => Array (6)
0 => 1
1 => "100100609"
2 => "munny"
3 => "DISTSTD"
4 => 0
5 => 0
3 => Array (6)
0 => 2
1 => "100300054"
2 => "sunny"
3 => "MEM"
4 => 0
5 => 0

```

Want to compare current level zero value with next level zero value like Array[0][0] == Array[1][0] using smarty.

I am able to get only the current element value. How can I get next element value in the current loop

```  {{foreach from=\$volume item=element}}
{{if \$element@iteration > 1}}
{{\$element[0]}}
{{/if}}
{{/foreach}}

```

Is This A Good Question/Topic? 0

## Replies To: compare multidimensional array values

### #2 sepp2k

• D.I.C Lover

Reputation: 2270
• Posts: 3,483
• Joined: 21-June 11

## Re: compare multidimensional array values

Posted 02 February 2013 - 12:07 AM

When asking a question in the "Other Languages" forum, you should mention which language you're talking about - preferably in the title.