When modifying data information, determine whether the value of the check box is selected
Use the function in_array (): determine whether the data is in the array
When you are about to get the data for a check box field, the format is: 1, 2, 3, 5
Then directly determine whether a value of this check box is in this array on the page.
It was done in the TP framework at that time:
Monday
The first parameter corresponds to the value in the value, and the following parameters are stored in the database by some options of the user when they are added, and then the two data are compared. If they are consistent, select this item.