How to use Foreach on two or more php arrays?
My arrays are $boardType, $hotelPrice and $hotelName
Solution is to add $index in the other arrays as suffix
<?php foreach ($hotelName as $index => $name):?>
<div>
<p><?php echo $name;?></p>
<p><?php echo $hotelPrice[$index];?></p>
<p><?php echo $boardType[$index];?></p>
</div>
<?php endforeach?>
foreach loopfor multiple arrays or accessing multiple valuesprice,type,namein a single array ?