Traversal-a question about a message board written in php

Source: Internet
Author: User
Yes. I am writing a message board in php, submitting it to php in a form, and writing it to the database with an account, title, and content. Then I want to extract it and display it on the page (this is also written in php ). However, I don't know how to extract and Traverse. I thought of a solution: $ usermysql_fetch_array (mysql_query (& quot; selectusernamefrommessage & quot;), MYSQL_NUM); $ titlemysql_fetch_array (mysql_query (& quot; selectt traverses php array database

Yes. I am writing a message board in php, submitting it to php in a form, and writing it to the database with an account, title, and content.
Then I want to extract it and display it on the page (this is also written in php ). However, I don't know how to extract and Traverse.
I thought of the following method:
$ User = mysql_fetch_array (mysql_query ("select username from message"), MYSQL_NUM );
$ Title = mysql_fetch_array (mysql_query ("select title from message"), MYSQL_NUM );
$ Content = mysql_fetch_array (mysql_query ("select content from message"), MYSQL_NUM );
Then traverse the three arrays. In this way, the page will be displayed in your favorite format. However, I found that only one record can be extracted from the database.
What should I do? Thank you !!!

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.