(PHP 4, PHP 5)
reset — اشارهگر داخلی یک آرایه را به اولین عضو آن قرار بده
reset() اشارهگر داخلی array را به اولین عضو آرایه بازمیگرداند.
آرایه ورودی.
مقدار اولین عضو آرایه را بازمیگرداند و یا FALSE اگر آرایه خالی باشد.
Example #1 مثال reset()
<?php
$array = array('step one', 'step two', 'step three', 'step four');
// by default, the pointer is on the first element
echo current($array) . "<br />\n"; // "step one"
// skip two steps
next($array);
next($array);
echo current($array) . "<br />\n"; // "step three"
// reset pointer, start again on step one
reset($array);
echo current($array) . "<br />\n"; // "step one"
?>