I have much count of items in MySQL database, and they must be shown on a web page. But, element, which set up earlier, must be first of whole data array. Currently, data recevied from Mysql sorted by creation time. Also, every item has a unique ID, which store in settings table. May be you help me to solve this little trouble.
UPDATE:
this php-array basically demonstrate my db structure
array(
0=>array(
"id"=>1,
"name"=>"xyz"
),
1=>array(
id"=>3,
"name"=>"abc"
),
2=>array(
id"=>5,
"name"=>"asdfbc"
)
);
UPDATE 2
I need to sort previous array. For example, first element must be item with id = 3, after elements must be sort by time creation (desc or asc). Time field (timestamp) exist, but I’m too lazy for add it 🙂
Try this: