Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // get posts
- $posts = SelectAllPosts();
- // loop through posts
- foreach($post as $p) {
- // print post title
- print $p['title'];
- // get all comments for current post
- $comments = SelectCommentsForPost($p);
- // loop through comments
- foreach($comment as $c) {
- // print comment title and message
- print $c['title']
- print $c['message'];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement