Is is possible in php when return some value from loop and execution of loop still continues from next index (like GetEnumerator() in C# and the use MoveNext())
problem-
$arr=[0,1,5,9,5];
$i=count($arr);
while($i>0){
// data base operations
$_GLOBALS['i']=$_GLOBALS['i']-1;
//return some value;
}
I am a c# programmer and new to php so any help or ideas would be highly appreciated ?