Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once'classes/Connection.php';
- require_once'classes/Story.php';
- try{
- $stories = Story::selectAll();
- }
- catch(Exception $e){
- die("Exception: " . $e->getMessage());
- }
- /*echo '<pre>';
- var_dump($stories[3]-> headline);
- echo '</pre>';*/
- foreach ($stories as $story){ ?>
- <h4><?=$story -> headline; ?></h4>
- <h6><?=$story -> subHeading; ?></h6>
- <div><?=$story -> article; ?></div>
- }
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement