Get the App
SLTechnology News&Howtos  ›  Network Security  › 

When modifying data information, determine whether the value of the check box is selected

Shulou Source: shulou.com Published: 2022-06-01 03:59:05 10月06日 Update

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.

Tags: Data check box parameter array consistent two function field that is database time is in format frame user page information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi vpn Shulou Information Microsoft MySQL