Home >Backend Development >PHP Tutorial >mysql - How does thinkphp retrieve data from the database in reverse order, and then output it to the template in forward order?

mysql - How does thinkphp retrieve data from the database in reverse order, and then output it to the template in forward order?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-08-26 10:28:262693browse

I’m a little confused, please ask an expert to explain.

Reply content:

I’m a little confused, please ask an expert to explain.

Write $result = array_reverse($result);
in the php code and then pass $result to the template

By controlling the sql statement, you can fetch data in reverse order order by field desc,

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn