Why's the endif;
not working? Can't figure it out. I apologize beforehand because It's probably a stupid typo or something but as I said I can't figure it out.
Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /Applications/XAMPP/xamppfiles/htdocs/jqueryphp/views/index.tmpl.php on line 28
<?php include "_partials/header.php"; ?>
<h1>Search actors by last name</h1>
<form action="index.php" method="post">
<select name="q" id="q">
<?php
$alphabet = str_split("abcdefghijklmnopqrstuvxyz");
foreach ( $alphabet as $letter ) {
echo "<option value='$letter'>$letter</option>";
}
?>
</select>
<button type="submit" name="button">
Go!
</button>
</form>
<?php if ( isset($actors) ) ?>
<ul class="actors_list">
<?php foreach( $actors as $a ) {
echo "<li>{$a->first_name} {$a->last_name}</li>";
}
?>
</ul>
<?php endif; ?>
<?php include "_partials/footer.php"; ?>