Theoretical question that perhaps does not make any sense but still, maybe there is a clever answer.
I want to iterate through array and get its keys and to somethin
loop to avoid a foreach in a while.
$a = ['1','A','B','12','ui']; while(true) { sleep(1); $b = next($a) ? current($a): reset($a); echo key($a) , ':' , $b , PHP_EOL; }