Jump to content

[SOLVED] parse error endforeach


mraza

Recommended Posts

hi i am having a parser error with this code :

 

<?php foreach($products as $product); ?>
<div class="product">
<h3><?php echo $product['title']; ?></h3>
<p><?php echo $product['body']; ?></p>
</div>
<?php endforeach; ?>

 

but if not include <?php endforeach; ?> it return me one title and body from the database but if i use that statement it is giving me parse error for this line<?php endforeach; ?> ...stuck...cant understand what's going on  any help ,, thanks a lot

Link to comment
https://forums.phpfreaks.com/topic/177013-solved-parse-error-endforeach/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.