What is the best practice for disabling HTML input fields using PHP?

When disabling HTML input fields using PHP, the best practice is to add the "disabled" attribute to the input field tag. This will prevent users from interacting with the input field and submitting any data.

<input type="text" name="example" value="Example Value" <?php echo $isDisabled ? 'disabled' : ''; ?>>