I have edited my question. I am trying to loop through each array and use it inside one foreach loop, is this possible?
foreach ($exhibitor as $exhibitors)
{
//Foreach loop of each variable we need
foreach ($exhibitorsLoop as $i) {
$names[] = $i['exhibitor']['exhname'];
$logos[] = $i['exhibitor']['onlinelogo'];
//Sponsorship level 2-11
$packages[] = $i['exhibitor']['package'];
$descriptions[] = $i['exhibitor']['description'];
$websites[] = $i['exhibitor']['website'];
}
}
How I plan to use it
<div>
<img class="img-responsive" src="<?php $logo ?>" alt="">
</div>
<div class="col-sm-8">
<h1 style="margin-top:0;"><?php echo $name; ?></h1>
<h2><?php echo $website; ?></h2>
</div>
When I print a value, such as print_r($logos), I get all the values. When I write a foreach loop such as
foreach ($names as $name) {
echo $name;
}
It also returns the value. But i'm having trouble getting it to return properly in the html block. Do I need to write a foreach loop for each array (names, logos, packages, etc.)?
I have tried a few different array merge methods but nothing gives me the final result I am looking for. I would like to have each exhibitor be looped through and use each key value somewhere in the html.