<?php $num = array(50,12,5,8,45); $output = array_slice($num, 0, 3); //first three number print_r($output); $output = array_slice($num, 3, 2); //skip 3 and select two number print_r($output); ?>