Home >Backend Development >PHP Tutorial >Is there any good way to sort by mobile position?

Is there any good way to sort by mobile position?

WBOY
WBOYOriginal
2016-10-23 23:59:58918browse

There is a list of items, sorted by the release time and auto-incremented ID by default, for example

<code>1 : 物品1
2 : 物品2
3 : 物品3
...</code>

If I want to move

<code>922 : 物品922</code>

To the 100th position.

So for this sorting, apart from adding 1 to all the positions of the content after the loop, is there any good method?

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