How can PHP arrays be utilized to exclude empty entries in a form summary?

When displaying a form summary using PHP arrays, empty form fields may result in unwanted empty entries. To exclude these empty entries, we can use the `array_filter()` function to remove any elements with empty values from the array before displaying the form summary.

// Example PHP code snippet to exclude empty entries in a form summary
$form_data = [
    'name' => 'John Doe',
    'email' => '',
    'phone' => '123-456-7890',
    'message' => ''
];

// Remove empty entries from the form data
$filtered_form_data = array_filter($form_data);

// Display the form summary
echo '<ul>';
foreach ($filtered_form_data as $key => $value) {
    echo '<li>' . ucfirst($key) . ': ' . $value . '</li>';
}
echo '</ul>';