I'm a beginner in PHP and I'm seeking your guidance to know the possibilities of placing a sequence of images in a zigzag order using PHP loop.
The number of images received may vary each time, so the img src code is placed in a foreach
loop, I currently have them display one below the other but would like to know if there is an opportunity to place them in a zigzag manner as image attached
$j=0;
foreach ($data['employee'] as $teammember) {
echo $data['team']['members'][$j]['TeamRank'] . "." . $data['team']['members'][$j]['name'] ;
echo "<img src='http://yyyyyyy/employeeimage'" . $j . "'.png' />";
$j = $j + 1;
}
I'm seeking your advice in placing the name and image in zigzag form.