What is the correct way to store the selected radio button in a new variable in PHP?

When a radio button is selected in a form, the value of the selected radio button needs to be stored in a new variable in PHP. This can be achieved by using the $_POST superglobal array to retrieve the value of the selected radio button and store it in a new variable for further processing.

// Retrieve the selected radio button value from the form
$selected_radio = $_POST['radio_button_name'];

// Use the $selected_radio variable for further processing
echo "Selected radio button value: " . $selected_radio;