Nếu tất cả những gì bạn đang tìm kiếm là một mảng các giá trị thì bạn có thể tách chúng thành nhiều đầu vào với các tên được chỉ định bởi mảng. Ví dụ:
Khi được đăng lên máy chủ
6 sẽ là một mảng với ba giá trị này.Nếu bạn muốn một cái gì đó phức tạp hơn cũng có thể, nhưng có lẽ không theo cách bạn đang nghĩ. Giá trị của bất kỳ
7 đã cho [hoặc
8, v.v.] là một chuỗi. Nghĩa là:- Bạn có thể đặt bất kỳ chuỗi nào bạn muốn trong đó
- Mã coi nó là một chuỗi, giống như bất kỳ chuỗi nào khác
Chuỗi đó có thể chứa các giá trị được phân định:
Nó có thể chứa JSON [sẽ phải được mã hóa HTML]:
Nó có thể chứa bất kỳ chuỗi nào bạn thích.
Những gì bạn làm với chuỗi đó là điều quan trọng. Ví dụ: nếu một chuỗi được phân định được đăng lên máy chủ thì bạn có thể
9 chuỗi đó vào các giá trị của nó. Hoặc nếu chuỗi JSON được đăng lên máy chủ thì bạn có thể
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
0 chuỗi đó vào cấu trúc dữ liệu của nó. [Bạn có thể cần phải
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
1 trước, đó là giá trị thử nghiệm.]Đó là một chuỗi giống như bất kỳ loại nào khác, bạn có thể phân tích nó như bất kỳ loại nào khác.
❮ HTML tag
Example
A file upload field that accepts multiple values:
Select files:
Select files:
Try it Yourself »
Definition and Usage
The
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
2 attribute is a boolean attribute.When present, it specifies that the user is allowed to enter more than one value in the
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
3 element.Note: The
2 attribute works with the following input types: email, and file. The
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
2 attribute works with the following input types: email, and file.Tip: For
5: To select multiple files, hold down the CTRL or SHIFT key while selecting. For
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
5: To select multiple files, hold down
the CTRL or SHIFT key while selecting.Tip: For
6: Separate each email with a comma, like: , , in the email field. For
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
6: Separate each email with a comma, like: , , in the email field.Browser Support
The numbers in the table specify the first browser version that fully supports the attribute.
multiple | 6.0 | 10.0 | 3.6 | 5.0 | 11.0 |
Syntax
❮ HTML tag
260
Nội dung chính ShowShow
- Làm thế nào đặt nhiều giá trị được chọn của hộp chọn trong PHP?
- Làm thế nào tôi có thể nhận được nhiều giá trị trong PHP?
- Làm cách nào để chọn nhiều giá trị từ một lựa chọn?
- Làm thế nào tôi có thể lưu trữ nhiều giá trị thả xuống trong PHP?
Bước 3: Tạo mã ...
Learn more.
$ con = mysqli_connect ["localhost", "root", "", "phptutorials"] ;.
Untitled Document
Multiple Selection
eleven
twelve
thirette
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
$ Thương hiệu = $ _POST ['Brandlist'] ;.