Ask a question about PHP arrays

Source: Internet
Author: User
Ask a question about PHP arrays




How do you realize that the values that exist in the database let the checkbox check in the page
------to solve the idea----------------------




1
2
3

------to solve the idea----------------------
Write it wrong, modify it




1
2
3

------to solve the idea----------------------
The options should be in the database, which is enumerated when the HTML page is generated,
You can specify that some of the IDs are selected
while ($row ==mysql_fetch_row ($res)) {
if ($row [' id]==6]
echo " ";
Else
echo " ";
}


------to solve the idea----------------------
Look at your structure, you should first use explode (', ', Goods_brand); Get to each of the Goods_brand
Then decide whether to correspond with the current checkbox, if yes, plus checked= "checked";
  • Related Article

    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.