Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <film>
- <title>Great Movie</title>
- <link>http://imdb.com/#</link>
- <poster>img-name</poster>
- <year>2012</year>
- </film>
- <ul>
- <?php
- $xml = new SimpleXMLElement ('database.xml',NULL,true);
- foreach($xml->film as $movie)
- {
- echo "<li>n";
- echo "<div class="film_container">n";
- echo "<div class="poster">n";
- echo "<a href="".$movie->link.""><img src="img/".$movie->poster.".jpg" /></a>n";
- echo "</div>";
- echo "<div class="info">n";
- echo "<h2>".$movie->title."</h2>n";
- echo "<p>".$movie->year."</p>n";
- echo "</div>n";
- echo "</div>n";
- echo "</li>n";
- }
- ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement