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

Menu