'The information in the cell orderdata = 3;890;ID117;K¤¤3;890;ID117;K¤¤3;890;ID117;K¤¤3;890;ID117;K
'The information in lines (obviously lol): 3;890;ID117;K
orderdata = rs("orderdata")
For Each i In lines
arrayTmp = split(i, ";")
prdAryTmp = prdAryTmp & "%%" & arrayTmp(0)
Next
productArray = split(prdAryTmp, "%%")
For Each i In lines
col = Split(i,";")
If UBound(col) > 0 Then 'if there are any products - go on
If IsArray(col) Then 'if it's an array (lol obviously)
If IsNumeric(col(1)) Then 'if the price is numeric
For Each x In productArray
If col(0) = x Then 'checks if the product is in the productArray
antal = antal + 1 'if it is, then it just adds 1 to the quantity (how many items)
End If
Next
summa = summa + (Cint(col(1))*antal) 'the totalprice of the product (singleprice*how many)
t=t&"<tr>"
t=t&"<td>"&antal&"</td>" 'print out :: how many of the same product
t=t&"<td>"&col(0)&"</td>" 'print out :: products name
t=t&"<td>"&col(1)&"</td>" 'print out :: products price
t=t&"<td align=right>"&col(1)*antal&"</td>" 'print out :: products totalprice
t=t&"</tr>"
End If
End If
End If
End If
Next