A small self-study question. could you please refer to the php Tutorial?

Source: Internet
Author: User
I am a little self-taught question. could you tell me why data checkbox cannot be selected? Where can I find out?






 User name:
Hobbies: >


Reply to discussion (solution)

Check whether the generated html is correct.

F12: look at the html generated on your page! It is often because you think you are correct, but there are errors!

F12: look at the html generated on your page! It is often because you think you are correct, but there are errors!



Check whether the generated html is correct.



Var_dump ($ arr );

See what it is

It seems that there is no problem to see the HTML. do you need to add other attributes?

Var_dump ($ arr );

See what it is



Array (3) {[0] => string (9) "playing Mahjong" [1] => string (9) "Watching Movies" [2] => string (6) "sleeping "}

Set before judgment
$ Sled = '';
The variable name is empty.

What does var_dump ($ ah) see?

What does var_dump ($ ah) see?



Array (4) {[0] => string (9) "playing Mahjong" [1] => string (9) "Watching Movies" [2] => string (12) "League of Legends" [3] => string (6) "sleeping "}

Set before judgment
$ Sled = '';
The variable name is empty.



It's empty. it's not useless.

If (in_array ($ ah [I], $ arr )){

If (in_array ($ ah [$ I], $ arr )){

This is the problem!
If (in_array ($ ah [I], $ arr )){
Less $
Should be
If (in_array ($ ah [$ I], $ arr )){

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.