treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] once again unexpected T_ELSE

  • Cant seem to find it.. also, can you use $posts more then once?

    <?php $posts = query_posts($query_string .'&orderby=title&order=asc');while (have_posts()) : the_post(); ?>
    <div class="list">
    <ul>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    </ul>
    <?php endwhile; ?>
    </div>
    <?php else : ?>
    <h2>test</h2>
    <?php endif; ?>
  • figured it out.