Updating yp_first example to proper use of array return.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@44009 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Ron Chmara 2001-03-21 05:17:28 +00:00
parent 6e6ca0cdf3
commit a8da862ae2

View file

@ -210,10 +210,10 @@ echo "Matched entry is: " . $entry;
<title>Example for the NIS first</title>
<programlisting role="php">
&lt;?php
$entry = yp_first($domain, "passwd.byname");
$key = key($entry);
echo "First entry in this map has key " . $key
. " and value " . $entry[$key];
$entry = yp_first($domain, "passwd.byname");
$key = $entry ["key"];
$value = $entry ["value"];
echo "First entry in this map has key " . $key . " and value " . $value;
?>
</programlisting>
</example>