構文エラーについて:Parse error: syntax error, unexpected 'else' (T_ELSE)
-
Parse error: syntax error, unexpected ‘else’ (T_ELSE)
上記エラーが出るのでます。elseに問題があるとのことですが、どう修正したらいいかわかりません。宜しくお願いいたします。<div id=”main”>
<?php
if(have_posts()):
while (have_posts() ) : the_post(); ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<h2>“><?php the_title(); ?></h2>
<p class=”post-meta”>
<span class=”post-date”><?php the_date(); ?></span>
<span class=”category”>Category – <?php the_category(‘, ‘) ?></span>
<span class=”comment-num”>
<?php commnets_popup_link(‘Comment : 0’, ‘Comment : 1’, ‘Comments : %’); ?>
</span>
</p>
<?php the_content(‘続きを読む »’) ?>
</div>
<?php ednwhile;
else : ?>
<div class=”post”>
<h2>記事はありません</h2>
<p>お探しの記事は見つかりませんでした。</p>
</div>
<?php endif; ?>
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「構文エラーについて:Parse error: syntax error, unexpected 'else' (T_ELSE)」には新たに返信することはできません。