How to make my own while Loop just like Wordpress Loop?

Posted by Takien on Stack Overflow See other posts from Stack Overflow or by Takien
Published on 2009-10-04T11:19:33Z Indexed on 2010/03/25 20:43 UTC
Read the original article Hit count: 297

Filed under:
|
|
|

Hi all programmer... im new here and new in PHP too..

Just wondering how to make my own flexible loop just like in Wordpress... Note im not talking about wordpress.. I want to implement it on myown PHP application...

let's look back in WP, there is a code something like this:

while (have_post() : thepost())// .. bla bla...

echo the_title();
echo the_content();

endwhile; // this is just an ilustration

Could you figure out how have_post() or the_post() interact with database, so that they can be loop..

thanks..

© Stack Overflow or respective owner

Related posts about php

Related posts about arrays