yp_first

yp_first -- Returns the first key-value pair from the named map.

Description

string[] yp_first(string domain, string map);

yp_first() returns the first key-value pair from the named map in the named domain, otherwise FALSE.

Example 1. Example for the NIS first

  1 
  2 <?php
  3     $entry = yp_first($domain, "passwd.byname");
  4     $key = key($entry);
  5     echo "First entry in this map has key " . $key 
  6           . " and value " . $entry[$key];
  7 ?>
  8       

See also yp-get-default-domain()