So I'm having trouble getting my html to show up in my php script foreach loop. I included my arrays in my header.php page which is included in the webpage that I'm building right now. Right now my website only shows an empty well since I'm using bootstrap.
I've already tried just putting regular html in the div and it works, which means there is something wrong in the php script.
My php arrays
<?php
//Teams
$teams = array(
"fnatic" => array(
title => "Fnatic",
teamLocation => "Sweden"
),
"tsm" => array(
title => "TSM",
teamLocation => "Denmark"
),
"envyus" => array(
title => "EnvyUs",
teamLocation => "France"
),
);
?>
Here is my html. The middle section where is where I'm trying to have my foreach loop display. I already included my header.php, which has my arrays, and my footer.php, which has all my scripts.
<?php
define('TITLE', 'PROS | CSGOPLAYER CONFIGS');
include('includes/header.php');
include('includes/minicarousel.php');
?>
<div class="container-fluid">
<div class="row">
<div class="well">
<?php foreach ($teams as $team => $item) { ?>
<h1><a href="team.php?item=<?php echo $team; ?>"><?php echo $item[title]; ?></h1>
<p><?php echo $item[teamLocation];?></p>
<?php } ?>
</div>
</div>
</div><!--Contect-->
<?php
include('includes/footer.php');
?>
$item[title]should be$item['title']. But PHP will convert it for you, although it prints a warning when it does this.</a></a>.