I have courses
and schools
array. I want to use schools array inside of courses array:
<? foreach ($courses as $course) {
<div class="cat_row">
<?= $course['location'] ?>
</div>
<? } ?>
When I use
<? foreach($schools as $coordinate){
echo $coordinate->latitude;
} ?>
inside of the first foreach it shows in every block all coordinates, like:
|first|second|third|
|1 2 3|1 2 3 |1 2 3|
How can I make as:
|first|second|third|
|1 |2 |3 |
? Can anyone help me with it?