I have a loop that is getting data from a form:
foreach ($data as $d) {
    $id = $dataEntity->getId();
    $content = $data['form['.$id.']'];
    $dataEntity->setContent($content);
}
I have one problem. In the case that form['.$id.'] is valid than the code is working. But when it is not valid I get the error message:
Notice: Undefined index: form[5207c07b25]
So I tried to change the code like this
 foreach ($data as $d) {
     $id = $dataEntity->getId();
     $formData = "form['.$id.']";
     if(isset($formData)){
         $content = $formData;
     } else {
          $content = "";
     }
     $dataEntity->setContent($content);
 }
But still I get the same error message.
 
     
    