<?php
function AsciiSwitch($InputString, $ValueToAdd){
$OutputString = "";
for ($i = 0; $i <= strlen($InputString) - 1; $i++) {
$c = $InputString[$i];
$OutputString = $OutputString. chr(ord($c) + $ValueToAdd);
}
return $OutputString;
}
$a= AsciiSwitch('frost hello hi', 12);
echo $a.'<br>';
echo 'ORGINAL is: '. AsciiSwitch($a, -12);