function flatten(array $array) {
$return = array();
array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; });
return $return;
}
$users = [
'иван',
'верьемин',
'москва',[
'английский',
'немецкий'
],];
foreach(flatten($users) as $u)
...
document.addEventListener("mousemove", function(e) {
let x = e.clientX - wrapper.offsetLeft - ellipse.offsetWidth/2;
if(x < 0)x = 0;
if(x > 125)x = 125;
ellipse.style.left = x + "px";
let y = e.clientY - wrapper.offsetTop- ellipse.offsetHeight/2;
if(y < 0)y = 0;
if(y > 125)y = 125;
ellipse.style.top = y + "px";
});