title: undefined offset of full array but vardump is full
body: <p>I have a few problems with my PHP code.</p>
  
  <pre><code>&lt;?php
    if(!empty($_POST['IP_adress'])){
      $IP_adress = $_POST['IP_adress'];
      $block[4] = explode(".",$IP_adress);
      $i = 0;
      var_dump($block);
      for($i=0;$i&lt;4;$i++){
        if ($block[$i]&lt;0 || $block[$i]&gt;255){//here is line 9
          $_SESSION['IP_error'] = "non-valid IP adress";
          header('Location: controle.php');
        }
      }
    }
  ?&gt;
  </code></pre>
  
  <p>when i launch the code, the var_dump function says that my array ($block) is  correctly filled but I have this errors.</p>
  
  <pre><code>array(1) { [4]=&gt; array(4) { [0]=&gt; string(3) "255" [1]=&gt; string(3) "255" [2]=&gt; string(3) "255" [3]=&gt; string(3) "255" } }
  
  Notice: Undefined offset: 0 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 0 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 1 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 1 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 2 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 2 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 3 in /var/www/html/select.php on line 9
  
  Notice: Undefined offset: 3 in /var/www/html/select.php on line 9
  
  [output errors][1]
  </code></pre>
  
  <p>Can you help me please ? </p>
  
  <p>p.s. sorry for bad grammar and english. French native speaker here !</p>