I have been searching Stack Overflow and the rest of the web, and I am starting to believe that there is no generic solution for undefined indexes. 

I have a massive PHP application with several form and at the end of the script I call all the form's inputs and put them together to display a summary of all the inputs.

```
echo $_POST['FirstName'];
echo $_POST['MiddleName'];
echo $_POST['LastName'];

```

I know how to check each occurence like

```
if ( !isset($_POST['MiddleName']) ) { $_POST['MiddleName'] = '' }

```

Is there a way to automatically capture all undefined indexes and then set them to 0 or null?