title: Multidimensional array undefined index
body: <p>i'm coding an Excel file generator. I need to get name of Owners from database, and then for all of them a list of procedures which was done. Of course I would like to show every procedure only once with a counter which points how many times every procedure had been made.
  I'm trying to do this with this code:</p>
  
  <pre><code>// to get the list of owners
  $this-&gt;comms = $this-&gt;warehouse-&gt;getComms();
  
  foreach($this-&gt;comms as $key=&gt;$comm)
  {
      // producer / procedure [name] [counter]
      $check1[] = array('comm'=&gt;$comm-&gt;name, 'operations'=&gt;array('operation'=&gt;'', 'counter'=&gt;0));
  
      // to get list of procedures for producer
      $this-&gt;operations = $this-&gt;warehouse-&gt;getCommOperations($comm-&gt;id, $this-&gt;date_from_search, $this-&gt;date_to_search);
  
      foreach($this-&gt;operations as $key=&gt;$operation)
      {
          if(!in_array($operation-&gt;dsName, $check1[$comm-&gt;name]['operations']['operation']))
          {
              $check1[$comm-&gt;name]['operations']=$operation-&gt;oService;
              $check1[$comm-&gt;name][$operation-&gt;oService]['counter']++;
          }
          else
          {
              $check1[$comm-&gt;id][$operation-&gt;oService]['counter']++;
          }
      }
  }
  </code></pre>
  
  <p>Unfortunately I'm receiving an Undefined index: Eden warning &amp; Warning: in_array() expects parameter 2 to be array warning at in_array check line. I would be very grateful for any help.</p>
  
  <p>Regards!</p>