title: how to Change a code generator function in ASP into PHP language
body: <p>I have no expreience in ASP codes and I couldn't change back this function to a PHP one</p>
  
  <pre><code>function  MELLICODE(CODE: STRING): Boolean;
  var a,b,c : integer;
  begin
     A:=strtoint(CODE[10]);
     B:=strtoint(CODE[1])*10 + strtoint(CODE[2])*9 +   
  strtoint(CODE[3])*8 + strtoint(CODE[4])*7 + strtoint(CODE[5])*6 + 
  strtoint(CODE[6])*5 + strtoint(CODE[7])*4 + strtoint(CODE[8])*3 + 
  strtoint(CODE[9])*2;
     C:=b-(b div 11)*11;
     If (c=0) and (a=c) then
         MELLICODE:=TRUE
    else if (c=1) and (a=1) then
         MELLICODE:=TRUE
      else if (c&gt;1) and (a=abs(c-11)) then
         MELLICODE:=TRUE
      else
          MELLICODE:=FALSE;
  </code></pre>
  
  <p>This is a code generator and it will produce a code with 10 numbers.</p>
  
  <p>I know that this is asking a lot but I tried so much but can't understand the language.</p>