Can someone that is familiar with VB Script and ASP have a quick look at this function and tell me what it does so I can translate it to PHP? The beginning I can translate just fine, it's the for loop that it has. That's where I'm not sure what the code is doing exactly. The best I can do by looking at it is that it's going through the string strTemp it's creating a new sum adding the value of each digit. Thanks.
Function CheckSum (strTemp)
Dim i, intTemp
If Not IsNumeric(strTemp) Then
CheckSum = 0
Exit Function
End If
intTemp = 0
For i = 1 To Len(strTemp)
intTemp = intTemp + CInt(Mid(strTemp, i, 1))
Next
CheckSum = intTemp
End Function