Some questions about PHP embedded in HTML syntax Conventions error

Source: Internet
Author: User
Some PHP embedded in HTML syntax convention error problem
Carefully typesetting a bit of HTML, and then slowly fill in the blanks, and finally sent two previous posts asked about nested circular query solve the problem.

However, the new problem appears, grammar is not written correctly, marked out, please advise:

PHP Code
  
  
  
  
More
********
/>//here error, say wrong
Here is an error, say wrong
Here is an error, say wrong



Thanks a lot!



------Solution--------------------
Isset judgment in front of old questions

Explore

Reference:

notice:undefined Index:pic
This is a hint that tells you that a key to the array is not defined by pic, that is, there is no $row [' pic '].
To be blunt, it's that you don't have a PIC column in your database's Product table.


No, I did. There are three columns in the table product.

Isn't that the wrong spelling?

Notice:undefined Index: ...

------Solution--------------------
I forgot the array of numbers returned by the mysql_fetch_row () function!
You can swap with MYSQL_FETCH_ASSOC (); He will return an associative array, as well as an array where the key name is the column name
------Solution--------------------
Get into the habit of checking manuals
A return array is a return associative array ...
I'll take a closer look at the code after your question.

Explore

Reference:

I forgot the array of numbers returned by the mysql_fetch_row () function!
You can swap with MYSQL_FETCH_ASSOC (); He will return an associative array, as well as an array where the key name is the column name


Cow! Thank you

I changed the nested mysql_fetch_row to MYSQL_FETCH_ASSOC, and it's done! What is the difference between these two functions?
  • 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.