php - Php code to display latest data on top always and push previous values bottom
问题描述
[Problem statement resembles this picture]
https://i.stack.imgur.com/Invsv.png
present output: 1 2 3 4 Expected output: 4 3 2 1 I dont want array_reverse.
解决方案
有什么理由不想使用 array_reverse()?
您也可以使用krsort($arr);
That 将按键降序排序。
推荐阅读
- python - 使用 AES 加密时的字节问题
- file-upload - 在vue js,元素ui上传组件中上传之前调整大小/压缩图像
- python-3.x - Python 3 - 当满足要求时,While 循环不会跳出循环
- laravel - Laravel 7外键约束格式不正确
- javascript - 如何验证表单中的电话号码:JavaScript
- javascript - 在第一行有行跨度的情况下,在表的第一行设置 css 样式 - 多表
- laravel - 404在laravel 6中找不到
- firebase - 测量 Firebase 的事件持续时间
- python - 如何将 Keras-Gaussian 噪声添加到图像数据中
- php - 多对多关系的 EntityType