Question: I have this simple array and I'd like to know how I can stop the **first 2** segments from showing.

```
if(preg_match_all('/<td[^>]*class="sourceNameCell">(.*?)<\/td>/si', $printable, $matches, PREG_SET_ORDER));{
foreach($matches as $match) {

$data = "$match[1]";

    $array = array();
    preg_match( '/src="([^"]*)"/i', $data, $array ) ;
    print_r("$array[1]") ;
}

```

Any help would be great, Thanks!

Answer: 
Use [`array_slice`](http://php.net/manual/en/function.array-slice.php):

```
$output = array_slice($input, 2); 

```
Use `array_slice($array, 2, count($array))` or make your regexp skip the first two if possible.

You could also invoke array\_shift() twice on the array. This might be more optimal since it shouldn't need to make a copy of the array.