I’m going mad over this – I can’t find the reason for the "unexpected {"-error being thrown right after the last "else" (7th line from below). Does anyone see something that I don’t?
<?php
$i = 0;
foreach($bgs as $bg) { ?>
<?php $i++; ?>
<div class="item <?php if($i == '1') echo "active"; ?> img-responsive" style="background-image: url('/new/images/<?=$bg['b_url']?>')" >
<div class="metabox">
<?php if(($bg['b_weight']) != '1000') { ?>
<h1><?=$bg['w_titel']?></h1>
<p><?=$bg['w_info']?> // <?=$bg['w_jahr']?> // <?=$bg['w_ort']?><?=$bg['w_function']?></p>
<?php if (isset($_GET['w']) && (is_numeric($_GET['w']))) { ?>
<?=$bg['w_desc']?>
<?php } else { ?>
<p><a href="index.php?w=<?=$bg['werkid']?>&t=<?=$bg['urlslug']?>" target="_self">More</a></p>
<?php } ?>
<?php } else { ?>
<h1><?=$bg['w_titel']?></h1>
<p><?=$bg['w_info']?></p>
<?php } ?>
</div>
</div>
<?php } ?>