Title: Loop for ?
Last modified: August 31, 2016

---

# Loop for ?

 *  Resolved [PsychoPunk](https://wordpress.org/support/users/psychopunk/)
 * (@psychopunk)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/loop-for/)
 * Hi everybody,
    i have one problem, Insert php works but look :
 * > [insert_php]
   >  include ‘connect.php’; echo “<p>wtf</p>”; for ($i = 1; $i <= 
   > 10; $i++) { echo $i; } for($x = 0; $x < 5; $x++) { echo ‘<p>’.$x.'</p>’; }
   > $query = ‘SELECT * FROM evenements ORDER BY date_debut DESC LIMIT 4’;
   >  $result
   > = $db->query($query);
   > for($i = 0; $i < 4; $i++)
   >  { echo ‘<div class=”produit”>’; echo ‘<img src=”
   > [http://www.gaea21.org/repertoire-vert/wp-content/uploads/2015/11/haricots.jpg”/>&#8217](http://www.gaea21.org/repertoire-vert/wp-content/uploads/2015/11/haricots.jpg”/>&#8217);;
   > echo ‘<h5>TOMATES DE GENEVE</h5>’; echo ‘<p>Description:Si resistendum nec 
   > cum sed nisi hac aetatis hanc acerbo intolerabili ad ad intolerabili causa.
   > </p>’; echo ‘<hr>’; echo ‘[Plus d”infos](https://wordpress.org/support/topic/loop-for/?output_format=md#)‘;
   > echo ‘</div>’; } [/insert_php]
 * The last loop FOR disable the all code i dont know why …
    Ty.
 * [https://wordpress.org/plugins/insert-php/](https://wordpress.org/plugins/insert-php/)

Viewing 1 replies (of 1 total)

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/loop-for/#post-7091459)
 * Ty, let me suggest you put the PHP code into a separate web page for debugging.
 * When the PHP code is debugged, then paste the corrected code into your WordPress
   post or page.
 * If the PHP code works without errors or warnings at your separate web page but
   not in WordPress with Insert PHP, see
 * [http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#nonworkingelements](http://www.willmaster.com/software/WPplugins/insert-php-wordpress-plugin-instructions.php#nonworkingelements)
 * for possible reasons.
 * Will

Viewing 1 replies (of 1 total)

The topic ‘Loop for ?’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3475630)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

## Tags

 * [for?](https://wordpress.org/support/topic-tag/for/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 1 reply
 * 2 participants
 * Last reply from: [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/loop-for/#post-7091459)
 * Status: resolved