<?php $input = array("a", "b", "c", "d", "e"); // заметьте разницу в индексах массивов print_r($input); print_r(array_slice($input, 2, -1)); print_r($input);
Standard input is empty
Array ( [0] => a [1] => b [2] => c [3] => d [4] => e ) Array ( [0] => c [1] => d ) Array ( [0] => a [1] => b [2] => c [3] => d [4] => e )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!