What is a common method to store values from input fields in an array in PHP?

To store values from input fields in an array in PHP, you can use the `$_POST` superglobal array to access the values submitted through a form. You can then loop through the input fields and store their values in an array for further processing.

// Retrieve values from input fields and store them in an array
$data = array();

foreach ($_POST as $key => $value) {
    $data[$key] = $value;
}

// Now $data array contains all the values from input fields