Can anyone assist with converting this VB6 function to PHP
Code:
Private Function GenerateKeyNumber(MyName as String) As Long
Dim i As Integer
Dim S As String * 1
Dim key As Long
key = 0
For i = 1 To Len(MyName)
S = Mid(MyName, i, 1)
key = key + Asc(S)
Next i
GenerateKeyNumber = Int(key * 14)
End Function