title: Check if field exists in for function PHP
body: <p>I have this PHP script: </p>
  
  <pre><code>for ($desc=1; $_POST['ddata'.$desc]; $desc++) { 
      if($_POST['ddata'.$desc]){
          if ($desc == 1){
              $ddata = $_POST['ddata'.$desc];
              $dlocatie = $_POST['dlocatie'.$desc];
          } else {
              $ddata = $ddata.' / '.$_POST['ddata'.$desc];
              $dlocatie = $dlocatie.' / '.$_POST['dlocatie'.$desc];
          }
      }
  }
  </code></pre>
  
  <p>If I have 5 <code>ddata</code> fields, it gives this error: <code>Undefined index: ddata6</code></p>
  
  <p>How can I check if that fields exists so I can prevent this error? </p>