Translate ASP to PHP ...

A

Anonymous

Guest
Could someone please translate these lines of ASP to PHP for me ?


Code:
 Dim strInputeCode
 Dim NumArr(8), i , x , d , otp
 Dim j 'As Integer

 strInputeCode = "12345678"
 x = "&H" + strInputeCode

        For i = 1 To 8
            NumArr(i) = "&H" + Mid (strInputeCode, i, 1)
            j = j + int ( NumArr(i) )
        Next

d = x \ j
otp = Hex (d + (x * 12) )

I appreciate that
 
well, It would be alot easier if you explain the code, what it does and so on-since I don't know asp
 
maybe it helps:
--> http://www.w3schools.com/asp/default.asp

why there is no :arrow: emoticon?? :eek:
 
Thanx a lot for your help
my problem were I couldnt understand what is (&H) ...
which is (HEXA) and its same as (0x) in PHP ...

and what is (\) which is like Integer Division ...
like:
intval ( 5 / 2 ) .... the answer is 2 , not 2.5 in PHP ...
and MID is like substr anyway ...

Well I got them all
Thanx a lot for your help :)
 
Back
Top