PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<yp_allyp_err_string>
view the version of this page
Last updated: Thu, 21 Aug 2003

yp_cat

(PHP 4 >= 4.0.6)

yp_cat --  Return an array containing the entire map

Description

array yp_cat ( string domain, string map)

yp_cat() returns all map entries as an array with the maps key values as array indices and the maps entries as array data.



add a note add a note User Contributed Notes
yp_cat
smchang at math dot inha dot ac dot kr
21-Dec-2002 10:12
result browsing code
<?php
$arraylist 
yp_cat($domain,"passwd.byname");
$key array_keys($arraylist);
$count count($key);
for ( 
$i 0$i $count $i++ ) {
        echo 
"COUNT $i  ->  ";
        echo 
$arraylist[$key[$i]];
        echo 
"<BR>\n";
}
?>
RESULT( Only First line )
COUNT 0 -> testuser:3jYXqr8fRm28M:500:500:PHP Test user:/home/testuser:/bin/csh

It, is in $key, is username(in example, testuser).

<yp_allyp_err_string>
 Last updated: Thu, 21 Aug 2003
show source | credits | sitemap | mirror sites 
Copyright © 2001-2003 The PHP Group
All rights reserved.
This mirror generously provided by: http://php.mirrors.ilisys.com.au/
Last updated: Sat 01 Nov 2003 04:13:36 EST EST