int key = 6;
String text ="Hellow Word!";
char [] chars =
text.toCharArray();
System.out.println(text);
for (char c : chars){
c += key;
System.out.print(c);
}
Sample output:
Hellow Word!
Nkrru}&]uxj
I tried to convert this code to a php one but i find it very hard.