<?php

include "pullPhotoFromCategory.php";
$data = pullPhotoFromCategory('landscape');
for ($i = 0; $i < count($data); $i++) {
    echo '<img id=' . 'l' . '"' . $i . '" ' . 'src=' . "'" . $data[$i] . "'" . 'height="100" width="150">';
}
                
            <div class="car-thumbs" style="display:none;">    
                <h4>Related Photos</h4>
                <?php 
$data = pullPhotoFromCategory('car');
for ($i = 0; $i < count($data); $i++) {
    echo '<img id=' . '"' . 'c' . $i . '"' . 'src=' . "'" . $data[$i] . "'" . 'height="100" width="150">';
}
?>
            </div>
            
            <!--Credits-->
            <?php 
$landNum = pullPhotoFromCategory('landscape');
$animalNum = pullPhotoFromCategory('animal');
$carNum = pullPhotoFromCategory('car');
$landCreditArray = array();
$animalCreditArray = array();
$carCreditArray = array();
for ($i = 0; $i < count($landNum); $i++) {
    array_push($landCreditArray, pullCredit($landNum[$i]));
}
for ($i = 0; $i < count($animalNum); $i++) {
    array_push($animalCreditArray, pullCredit($animalNum[$i]));
}
for ($i = 0; $i < count($carNum); $i++) {
    array_push($carCreditArray, pullCredit($carNum[$i]));
}
for ($i = 0; $i < count($landNum); $i++) {
    echo '<span id=' . '"' . 'lt' . $i . '"' . 'style="display:none;">' . '&copy' . $landCreditArray[$i] . '</span>';
}