Hej,
Detta tycker jag borde funka:
<% intAntal = 0
Do Until RS.EOF
intAntal = intAntal + 1 %>
<img src="<%=RS("bild")%>" alt="">
<% If intAntal = 4 Then
intAntal = 0 %>
<br>
<% End if
RS.MoveNext
Loop %>
2 svar · 425 visningar · startad av Alkvettern
Hej alla!
Har en databas där jag hämtar upp spelarbilder.
Nu vill jag visa dom fyra o fyra
sä här:
BILD BILD BILD BILD
BILD BILD BILD BILD
BILD BILD BILD BILD
osv.
istället för som det ser ut nu:
BILD
BILD
BILD
osv.
Hur gör jag?
Hej,
Detta tycker jag borde funka:
<% intAntal = 0
Do Until RS.EOF
intAntal = intAntal + 1 %>
<img src="<%=RS("bild")%>" alt="">
<% If intAntal = 4 Then
intAntal = 0 %>
<br>
<% End if
RS.MoveNext
Loop %>
Eller tabellversionen:
<%
intAntal = 0
response.write "<table border=0>"
response.write "<tr>"
Do Until RS.EOF
intAntal = intAntal + 1
response.write "<td>" & RS("bild") & "</td>"
If intAntal = 4 Then
intAntal = 0
response.write "</tr><tr>"
end if
RS.MoveNext
Loop
response.write "</tr>"
response.write "</table>"
%>