Created
June 1, 2013 01:02
-
-
Save anonymous/5688916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php foreach ($movies as $movie_id => $movie): ?> | |
<tr> | |
<td><a href="movies.php?id=<?=$movie_id?>"><?=$movie->title?></a></td> | |
<td><?=date('Y', strtotime($movie->release_date))?></td> | |
<td><?=$movie->vote_average?></td> | |
<?php | |
$genres = array(); | |
foreach ($movie->genres as $genre) | |
{ | |
$genres[] = $genre->name; | |
if (!empty($_GET['genre']) && is_numeric($_GET['genre']) && $_GET['genre'] != $genre->id) | |
continue 2; | |
} | |
?> | |
<!-- | |
<td><?=implode(', ', $genres)?></td> | |
--> | |
<td><?=$movie->overview?></td> | |
<td>[<a href="http://imdb.com/title/<?=$movie->imdb_id?>">IMDb</a>] | |
[<a href="http://www.themoviedb.org/movie/<?=$movie->id?>">TMDb</a>] | |
[<a href="movies.php?id=<?=$movie_id?>">Play</a>]</td> | |
</tr> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment