Multi Array Counting By Key

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Multi Array Counting By Key

    I have a problem with array:
    [code]
    Array( [0] => Array ( [id] => 1 [time] => 1229109396 ) [1] => Array ( [id] => 2 [time] => 1229110705 ) )

    and i want count arrays in array by time
    mytime>array time

    sorry for my english

    #2
    Penguin?

    Comment


      #3
      <div class='quotetop'>QUOTE (Munis @ Dec 12 2008, 12:11 PM) <{POST_SNAPBACK}></div>
      I have a problem with array:
      [code]
      Array( [0] => Array ( [id] => 1 [time] => 1229109396 ) [1] => Array ( [id] => 2 [time] => 1229110705 ) )

      and i want count arrays in array by time
      mytime>array time

      sorry for my english [/b]

      Array( [0] => Array ( [id] => 1 [time] => 1229109396 ) [1] => Array ( [id] => 2 [time] => 1229110705 ))

      U want to count what is in red?

      Comment


        #4
        count number in array

        count($array[0]) where $array is the outside wrapper (the first array)

        and that goes for everything to do with arrays .. if you wanna add the vals together use array_sum($array[0]) e.c.t.

        Comment

        Working...
        X