Calculate sum of ascii values of email address in php -


i want echo sum of lowercase ascii values of email address. example:

a@b.nl

97(a) + 64(@) + 98(b) + 46(.) + 110(n) + 108(l) = 523

any idea how calculate in php?

try use ord() in php:

ord() 

example

$str = "a@b.nl"; $sum = 0;  $arr1 = str_split($str); foreach($arr1 $item){    $sum += ord($item); } 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -