You are here: Re: Few lines of C++ to PHP « PHP Programming Language « IT news, forums, messages
Re: Few lines of C++ to PHP

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
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация