endif;
が機能しないのはなぜですか?それを理解できません。私はあらかじめ謝る。おそらく愚かなタイプミスかもしれないが、私が言ったように私はそれを理解することはできない。Endif文が実行されない
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"; ?>
で修正される!! – Kunal