[Solved] how to add checkbox in select option in php?

Adding a checkbox to a select option in PHP can be a great way to give users more control over their selections. It can also be a useful tool for creating more complex forms. In this tutorial, we will discuss how to add a checkbox to a select option in PHP. We will cover the basics of creating a checkbox, adding it to a select option, and how to handle the data when the form is submitted. By the end of this tutorial, you will have a better understanding of how to add a checkbox to a select option in PHP.

You can’t add a checkbox in a select option in PHP. However, you can use HTML and JavaScript to achieve this. You can use the tag to create a checkbox and then use JavaScript to add it to the select option.

I’m not sure I understand the principle of putting a checkbox in a list.
If this is to select all default item, you may use the lists multipe with the selected option on the option tags

<select multiple size="10">
...
    <option selected="selected" value="<?=$row['first_name']?>"><?=$row['last_name']?></option>
....

good luck ?