The user input is stored in the variable $input.
so i want to use preg replace to swap the letters from the user input that will range from a-z, with my own custom alphabet.
My code i am trying, which doesnt work is below:
preg_replace('/([a-z])/', "y,p,l,t,a,v,k,r,e,z,g,m,s,h,u,b,x,n,c,d,i,j,f,q,o,w", $input)
This code however doesnt work.
If anyone has any suggestions on how i can get this working then that would be great. Thanks
Don’t jump for
preg, whenstris enough: