<?php $str = '13,342,33,344,5,36,745,845,449,310,1231,12';$numbers = explode(',', $str);print_r(array_slice($numbers, 0, 10)); // первые десятьprint_r(array_slice($numbers, 2, 4)); // с 3 по 6
Standard input is empty
Array ( [0] => 13 [1] => 342 [2] => 33 [3] => 344 [4] => 5 [5] => 36 [6] => 745 [7] => 845 [8] => 449 [9] => 310 ) Array ( [0] => 33 [1] => 344 [2] => 5 [3] => 36 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!