Array_slice is useless.

    $result= array(); foreach ($infos as $key => $info) { $result[$info["time"]][] = $info;};
    $results=array_slice($result,0,255);

in this code, I want to use array_slice to remove the key value of $result, but I don"t use

.
Php
Feb.26,2021

official documentation: array_slice-fetches a segment from the array ,
if you want to remove the key value of an array, my usual method is array_values-returns all the values in the array

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9b3f0-2f273.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9b3f0-2f273.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?