How does discuz convert a data table into an array?

Source: Internet
Author: User
How does discuz convert a data table into an array? The following data set is in the channel column table. My question is, how does discuz convert the data in the data table into an array?
Array ([0] => Array ([catname] => Channel column 1) [1] => Array ([catname] => Channel Column 2) [2] => Array ([catname] => channel topic 3 [3] => Array ([catname] => channel topic 4) [4] => Array ([catname] => Channel Column 5) [5] => Array ([catname] => Channel Column 6 ))


Reply to discussion (solution)

Didn't you understand what you said, didn't you use foreach?
You should check the source code yourself.

Didn't you understand what you said, didn't you use foreach?
You should check the source code yourself.


I mean: how does discuz make the data table into an array? Can I also recommend a convenient method for tracking source code? I have read some tracing methods on the Internet, it is not a common trouble to configure it, and it still fails after several hours. I tried it N times, so I gave up. for example, the xedug method and the firephp method are used. the debugging based on the tutorial fails.

Resources retrieved by a while loop are organized into arrays by themselves.
Let's take a look at the \ source \ class \ discuz \ discuz_database.php, fetch_all () method.

I used file_put_content () to output the desired data.
You can use NetBeans. as long as discuz is introduced, you can use the control + left mouse button to automatically jump to the file defining this method.

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.