I have a crazy night today as i cant solve it and i cant find any solution all i can find is a solution if its only 2 arrays but i have more than 2. My questions is it possible to loop multiple arrays in a single foreach? the code below works for branchname but not on the other array
<?php
$branchNameList = array("branch_name1", "branch_name2", "branch_name3", "branch_name4");
$branchPhotoList = array("photo1", "photo2", "photo3", "photo4");
$branchAddList = array("address1", "address2", "address3", "address4");
$branchMapList = array("maplink1", "maplink2", "maplink3", "maplink4");
$branchTelList = array("branch_tel1", "branch_tel2", "branch_tel3", "branch_tel4");
foreach ($branchNameList as $branchName) {
echo '<div>
'.$params->get($branchPhoto).'
</div>
<h2>
'.$params->get($branchName).'
</h2>
<div>
<a href="'.$params->get($branchMap).'">'.$params->get($branchAdd).'</a>
</div>
<div>
<a href="#">'.$params->get($branchTel).'</a>
</div>';
}
?>
please can someone help me?
thank you