diff options
| author | Teddy Wing | 2013-10-01 02:23:14 -0400 |
|---|---|---|
| committer | Teddy Wing | 2013-10-01 02:23:14 -0400 |
| commit | fbcc4242e352ef50008b10d1bb52e88a14bce9ea (patch) | |
| tree | ff3eb1a70aabac10d533faf83d13fa1c101e8529 /index.php | |
| parent | 37037b1e70159b5214972d53d3cca8ca5a9b6b93 (diff) | |
| download | Boston-Food-Truck-Schedule-API-fbcc4242e352ef50008b10d1bb52e88a14bce9ea.tar.bz2 | |
Only link if the truck has a website
If no website exists for the truck, don't wrap its name in an <a> tag
to minimise confusion (previously the link would go to the current
page which was misleading).
Diffstat (limited to 'index.php')
| -rw-r--r-- | index.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -106,7 +106,11 @@ $schedule = $BostonFoodTrucks->schedule(array( <?php foreach ($schedule['food_trucks'] as $truck): ?> <tr> <td class="company"> - <a href="<?= $truck['company_url'] ?>"><?= $truck['company'] ?></a> + <?php if ($truck['company_url']): ?> + <a href="<?= $truck['company_url'] ?>"><?= $truck['company'] ?></a> + <?php else: ?> + <?= $truck['company'] ?> + <?php endif; ?> </td> <td class="location"> |
