PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

yp_order> <yp_match
Last updated: Fri, 22 Aug 2008

view this page in

yp_next

(PHP 4, PHP 5 <= 5.0.5)

yp_next Devuelve la siguiente clave tecleada en el nombre de mapa

Descripcion

string[] yp_next ( cadena $dominio , cadena $ mapa , cadena $ teclea )

yp_next() devuelve el siguiente par de valor tecleado en el mapa de nombres despues de la clave especificada o FALSO.

Example #1 Ejemplo para NIS siguiente

<?$entry=yp_next($dominio,"passwd. byname"."joe");
     if(!
$entry){echo yp_errno().":".yp_err_string();}
     
$key=key($entry); echo "La siguiente entrada despues joe fue".$key."Y su valor".$entry[$key];?>

Ver tambien: yp_get_default_domain yp_errno y yp_err_string



add a note add a note User Contributed Notes
yp_next
russell dot brown at insignia dot nospam dot com
04-Jul-2001 08:45
If you combine yp_first and yp_next you can get the whole list:
function yp_list($domain, $map) {
   $entry = yp_first($domain, $map);
   $key = $entry ["key"];
   $yplist[$key] = $entry ["value"];
   
   while ($entry) {
      $entry = yp_next($domain, $map, $key);
      if ($entry) {
         $nextkey = key ($entry);
         $yplist[$nextkey] = $entry[$nextkey];
         $key = $nextkey;
      }
   }
   return $yplist;
}

yp_order> <yp_match
Last updated: Fri, 22 Aug 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites