Yngvarr

Generation

generate functionSun, 12 Feb 2023

обрезка массива

function array_slice_assoc(array &$array, $offset, $length = null, $preserve_keys = false) { $array = array_slice($array, $offset, $length, $preserve_keys); return $array; } $arr = array( 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4 ); $arr = array_slice_assoc($arr, 1); print_r($arr);

Questions about programming?Chat with your personal AI assistant