Here is a working implementation, without using a nested loop. You also do not need to split the string into an array, as you can index individual characters in the same way as an array with strings in PHP.
, ASCII 65 99, - 97 122. , 13 ASCII. , . , 26.
$string = "Vs lbh nfxrq Oehpr Fpuarvre gb qrpelcg guvf, ur'q pehfu lbhe fxhyy jvgu uvf ynhtu.";
for ($i = 0, $j = strlen( $string); $i < $j; $i++)
{
$char = ord( $string[$i]);
if( ($char >= 65 && $char <= 90) || ($char >= 97 && $char <= 122))
{
$char += 13;
if( $char > 122 || ( $char > 90 && ord( $string[$i]) <= 90))
{
$char -= 26;
}
}
echo chr( $char);
}
:
, .