RunPHP — getting error sometimes
-
Hi,
I’m experimenting with runPHP so that I can include dynamically-updated lists of links on a new site.
If I run the following code, all is well:
<div class="box">
<ul><?php get_archives('postbypost','10','custom','<li>','</li>'); ?></ul>
</div>But if I try to run this I get an error message:
<div class="box">
<ul>
<?php $archive = get_posts('numberposts=20&cat=1'); ?>
<?php foreach($archive as $post) : ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
The message is:
Parse error: parse error, unexpected $ in /htdocs/test/wp-content/plugins/runPHP/runPHP.php(359) : eval()’d code on line 1
Parse error: parse error, unexpected T_ENDFOREACH in /htdocs/test/wp-content/plugins/runPHP/runPHP.php(359) : eval()’d code on line 1Anyone have any ideas why this should be?
- The topic ‘RunPHP — getting error sometimes’ is closed to new replies.