function fotos($table3,$type,$url,$klichka)
{
$select = "SELECT * FROM $table3 where pol = '$type' AND klichka = '$klichka'";
$result = mysql_query($select);
echo "<center><table>";
$rows = mysql_num_rows($result);
$row = mysql_fetch_row($result);
for( $i = 0 ; $i < ceil($rows / 4 ); $i++ )
{
echo "<tr>";
for( $j = 0 ; $j < 4 ; $j++ )
{
if( isset( $row[ ( ( $i * 4 ) + $j ) ] ) )
{ echo "<td><img src=$url/" . $row[4][ ( ( $i * 4 ) + $j ) ] .
" alt=" . $row[3][ ( ( $i * 4 ) + $j ) ] .
"></td>"; }
else
{ echo "<td> </td>"; }
}
echo "</tr>";
}
echo "</table></center>";
}