0){ $m = $_SESSION[x]-1; $strphoto .= ""; $strphoto .= 'Previous image'; $strphoto .= ''; } if($_SESSION[qnt] > 1){ for ($i=0; $i < $_SESSION[qnt]; $i++){ if ($_SESSION[x] == $i){ $m = $i+1; $strphoto .= "$m"; $strphoto .= ''; } else { $menuname = $i+1; $strphoto .= "$menuname"; $strphoto .= ''; } } } if($_SESSION[x] < $_SESSION[qnt]-1){ $m = $_SESSION[x]+1; $strphoto .= ""; $strphoto .= 'Next image'; $strphoto .= ''; } $photo = $_SESSION[code] .$mycode[$_SESSION[x]]; include ("viewphoto.sty"); ?>