c# - What is the php equivalent for Encoding.ASCII.GetBytes(vstrEncryptionKey.ToCharArray()) -


this question has answer here:

what php equivalent following c# code

encoding.ascii.getbytes(vstrencryptionkey.tochararray()) 

where vstrencryptionkey variable?

use ord function (http://php.net/ord) , mb_strlen function http://php.net/manual/en/function.mb-strlen.php)

<?php $var = $vstrencryptionkey;  for($i = 0; $i < mb_strlen($var, 'ascii'); $i++) {    echo ord($var[$i]); } ?> 

this modified code answer given in how byte values of string in php?


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -