1 Replies - 1288 Views - Last Post: 02 February 2013 - 12:07 AM Rate Topic: -----

#1 paipallecode  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2112
  • View blog
  • Posts: 3,230
  • 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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1