From a8da862ae2300766239aee9e7c02e38f35268262 Mon Sep 17 00:00:00 2001 From: Ron Chmara Date: Wed, 21 Mar 2001 05:17:28 +0000 Subject: [PATCH] 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 --- functions/nis.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/nis.xml b/functions/nis.xml index e6637e4216..41c0a3734e 100644 --- a/functions/nis.xml +++ b/functions/nis.xml @@ -210,10 +210,10 @@ echo "Matched entry is: " . $entry; Example for the NIS first <?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; ?>