zobrazuje jeden obrazok 2 krat vedla seba..pricom chcem len jeden...v com moze byt chyba?
Kód:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sk" lang="sk">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
<title>Photos</title>
<?php
// vztvorime si pole formatov jpg gif a png
$exArray = array('jpg', 'gif', 'png');
if ($handle = opendir('./images/'))
{
while (false !== ($file = readdir($handle)))
{
$fileEx = substr(strstr($file, '.'), 1);
if (in_array($fileEx, $exArray))
// Yobrayime si mali nahlad a po klknuti cely obr
{
echo '<a target="blank" href="images/079.jpg"><img src="images/079.jpg" alt="" width="110" height="100" /></a>';;
}
}
closedir($handle);
}
?>