What is the function of the "checked" attribute in radio buttons in PHP forms?
The "checked" attribute in radio buttons in PHP forms is used to pre-select a radio button option by default. This is useful when you want to have one option already selected when the form is loaded. To use the "checked" attribute, you can add it to the desired radio button input element in the HTML form.
<form action="submit.php" method="post">
<input type="radio" name="gender" value="male" checked> Male
<input type="radio" name="gender" value="female"> Female
<input type="submit" value="Submit">
</form>