How can I reset an array in PHP?

Answer Posted / madipally

Its very simple uday,

we have an array of numbers , which contains
"Item1","Item2","Item3".

when we call next($numbers) , the pointer will be jump to
the next item, in this case Item2.After resetting using
reset($numbers) pointer will move to the first location that
is "Item1".

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 5 types of variables?

555


what is the use of include_once in php?

529


What is difference between action hook and filter hook?

489


Why php 7 is faster?

501


What is the difference between a session and cookies?

485






What is an example of a variable?

536


How do I sort numbers in php?

531


Do you know what is the differences between $a != $B and $a !== $B?

487


What are default session time and path?

557


What are new features in php 7?

545


What is php good for?

502


Does php 7 support mysql?

555


How do you use an array in excel?

523


What is the use of the function 'imagetypes()'?

541


How to remove all duplicate values in array in php?

515