Help w/ parse error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shanest
Forum Newbie
Posts: 1
Joined: Fri Dec 24, 2004 2:05 pm

Help w/ parse error

Post by shanest »

I am getting the following error:

Parse error: parse error, unexpected $ in /home/shanest/public_html/wp-content/themes/shanest/index.php on line 20

for the following <i>23</i> lines of code:

Code: Select all

<?php include "header.php"; ?>

	<?php if (have_posts()) : ?>
		<?php while (have_posts()) : the_post(); ?>

<div class="headline"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></div>
<div class="subheadline">Posted to <?php the_category(', ') ?> at <?php the_time('g:i A') ?> on <? the_date(); ?></div>
<br />
<div class="story">
<?php the_content('Read the rest of this entry &raquo;'); ?>
</div>
<div class="storyfoot">
<?
$forum = mysql_query("SELECT * FROM wp_categories WHEN ID=the_category_ID();");
$forum_id = mysql_fetch_array($forum);
?>
Discuss in <a href="http://forum.shanest.com/index.php?action=vtopic&forum=<? $forum_id&#1111;'forum_id'] ?>"><? the_category_unicode(); ?> Forum</a>
</div>
<?php endwhile; ?>

<?php include "searchform.php"; ?>

<?php include "footer.php"; ?>
What is causing this error?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

<? $forum_id['forum_id'] ?> .. You forget an echo. Or a shorthand echo (=).
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

i think your also missing an endif;
Post Reply