From ff4dc961b35e760463d39f9473b0f252c203144b Mon Sep 17 00:00:00 2001 From: "Heilig (Cece) Szabolcs" Date: Sun, 17 Aug 2003 12:12:48 +0000 Subject: [PATCH] added example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@138076 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/reset.xml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/reset.xml b/reference/array/functions/reset.xml index 499b99491b..7a7dca193f 100644 --- a/reference/array/functions/reset.xml +++ b/reference/array/functions/reset.xml @@ -1,5 +1,5 @@ - + @@ -19,6 +19,32 @@ internal pointer to the first element and returns the value of the first array element. + + + <fucntion>reset</function> example + +\n"; // step "one" + +// skip two steps +next($array); +next($array); +echo current($array)."
\n"; // "step three" + +// reset pointer, start again on step one +reset($array); +echo current($array)."
\n"; // "step one" + +?> +]]> +
+
+
See also current, each, next,