title: Why those "undefined offset", "undefined index" notices keep showing?
body: <p>I'm trying to get some data from server with the help of php script, that looks like:</p>
  
  <pre><code>$count_list = array();
  while($row = $result-&gt;fetch_assoc()){
      $count_list[$row['index']][$row['id']] = $row['count'];
  }
  $result-&gt;close();
  
  for($i = 1; $i &lt; 5; $i++){
      if($count_list[$i] === null || $count_list[$i][CONTENT_ID1] === null){
          $count_list[$i][CONTENT_ID1] = 0;
      }
      if($count_list[$i] === null || $count_list[$i][CONTENT_ID2] === null){
          $count_list[$i][CONTENT_ID2] = 0;
      }
      if($count_list[$i] === null || $count_list[$i][CONTENT_ID3] === null){
          $count_list[$i][CONTENT_ID3] = 0;
      }
  
      $_smarty-&gt;assign("p".$i."c", min($count_list[$i][CONTENT_ID1], $count_list[$i][CONTENT_ID2], $count_list[$i][CONTENT_ID3]));
  }
  </code></pre>
  
  <p>I'm getting "undefined offset", "undefined index" Notices.
  As you can see, I even added some checks inside for-loop to ensure, that there will be no null values for min() function, but then the same Notices are showing right at those check lines. What am I doing wrong, and how should I get rid of those Notices. I just want, every non-existing element of my array to be 0. thanks in advance.</p>