• PHP Video Tutorials

PHP - Ds Map skip() Function



Ds\Map::skip() function can return the pair at a given positional index.

Syntax

public Ds\Pair Ds\Map::skip( int $position )

Ds\Map::skip() function can return the pair at a given zero-based position.

Ds\Map::skip() function can return the Ds\Pair at a given position. This function can throw OutOfRangeException if the position is not valid.

Example

<?php  
   $map = new \Ds\Map(["a" => 10, "b" => 20, "c" => 30]);  
   print_r($map->skip(1));  
   
   $map = new \Ds\Map(["1" => "Tutorials", "2" => "Point", "3" => "India"]);  
   print_r($map->skip(2)); 
?>
php_function_reference.htm
Advertisements