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.