| Posted by Hendri Kurniawan on 01/05/07 04:59 
I think you are trying to convert hexadecimal number to decimal, then add them together.
 <?php
 $temp = str_split($myString);
 $returnValue = 0;
 foreach($temp as $each) $returnValue += hexdec($each);
 ?>
 
 Hope that helps
 
 Hendri Kurniawan
 
 jenkinsp@gmail.com wrote:
 > Hey,
 >
 > How would i do this in php ? (from borland c++)
 >
 >  for (int i=1; i<=myString.Length(); ++i)
 >       {
 >          returnValue += StrToInt(AnsiString("0x" +
 > (AnsiString)myString[i]));
 >       }
 > --
 > thanks
 > Paul
 > www.pjenkins.co.uk
 >
 [Back to original message] |