Title: Mini Loop Php Syntax HELP!
Last modified: August 18, 2016

---

# Mini Loop Php Syntax HELP!

 *  [fess](https://wordpress.org/support/users/fess/)
 * (@fess)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/mini-loop-php-syntax-help/)
 * Hello,
 * I’ve tried my best but the php syntax is a killer (noting like MEL). I’m a cg
   guy and don’t know .php syntax.
 * Anyway, problem is my mini loop. It has this indentation that I absolutely don’t
   know how to get ride of.
 * Please see this [screenshot](http://www.mohan-conceptual.com/blog_mini_problem.jpg)(
   the green arrows point to the problem areas).
 * Is this indentation caused by the style, or the code in the blog_mini.php document?
 * Hoping a .php savvy dude can kick some advice! Thanks.
 * Here is the code in my blog_mini.php document
 *     ```
       <base target="_blank" />
   
        <link rel="stylesheet" type="text/css" href="http://www.mohan-conceptual.com/images/style_blogMini.css">
   
        <b>
   
       <?php
       $how_many=25; //How many posts do you want to show
       require_once("./blog/wp-config.php"); // Change this for your path to wp-config.php file ?>
   
       <ol id="whats-new">
   
       <?
       $news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code> FROM $wpdb->posts
       WHERE <code>post_status</code>= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many);
       foreach($news as $np){
       printf ("<li><a href=\"blog/index.php?p=%s\">%s</a></li>", $np->ID,$np->post_title);
       }?>
       </ol>
   
       </b>
   
       <p align="left"><a target="_blank" href="http://www.mohan-conceptual.com/blog"><b><u>More CG news></u></b></a></p>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/mini-loop-php-syntax-help/#post-538908)
 * We’ll never know without a real link to observe, but I’d wager the issue is style/
   CSS.
 *  Thread Starter [fess](https://wordpress.org/support/users/fess/)
 * (@fess)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/mini-loop-php-syntax-help/#post-539145)
 * that test page was taken down, sorry.
 * I actually found that by replacing the `<ol><li></li></ol>` tags solved the indentation
   issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Mini Loop Php Syntax HELP!’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [fess](https://wordpress.org/support/users/fess/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/mini-loop-php-syntax-help/#post-539145)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
