error in line <? foreach($postimg as $image)
-
Hi,I am new to programming.
If you look at the following blog https://outdooractivitiesforkids.com/wordpress/?p=3 I get the following error
Warning: Invalid argument supplied for foreach() in /home/a6228915/public_html/wordpress/wp-content/themes/positie_1/index.php on line 11
and LINE 11 in index.php says:
1. <?php get_header(); ?>
2.
3. <?php include(TEMPLATEPATH.”/sidebar.php”);?>
4.
5. <!– begin content –>
6. <div id=”main”>
7. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
8. <h1><?php the_title(); ?></h1>
9.
10. <? $postimg = get_post_meta($post->ID, “pre_image”, false); ?>
11. <? foreach($postimg as $image) {
12. echo “<img class=\”fullimg\” src=\””.$image.”\” />”;
13. } ?>
.
.
.
.
.Please help how do I fix it. I want pictures in my blog.
- The topic ‘error in line <? foreach($postimg as $image)’ is closed to new replies.