Is there a way to sort by keyword???
thx for help
<?php
$files = glob("*.*");
for ($i=0; $i<count($files); $i++)
{
$image = $files[$i];
$supported_file = array('jpg',);
$ext = strtolower(pathinfo($image, PATHINFO_EXTENSION));
$img = basename($image);
$size = getimagesize($img, $info);
if(isset($info['APP13']))
{
$iptc = iptcparse($info['APP13']);
$keyword0 = $iptc["2#025"][0];
if($keyword0 == "") {$keyword0 = "";} else {$keyword0 = $keyword0;}
$keywords = $keyword0;
}
if (in_array($ext, $supported_file)) {
echo '
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-4 col-xl-3 outerContent" id="theme"><a class="example-image-link" href="',$img,'" data-lightbox="example-set" data-title="'.$keywords.'"><div class="innerContent" style="background-image: url(',$img,')"></div></a></div>';
$keywords = "" ;
} else {
continue;
}
}
?>