Skip to content
Advertisement

Own Encoding System with str_replace

I was thinking about creating a own encode system with just using str_replace. But is this even possible or should I use other methods?

I had this

JavaScript

The result should show the encrypted data. But when I try it, it doesn’t return me anything.

Advertisement

Answer

Make sure the input is passed correctly. The below code prints “[…][…][…][…][…]”.

JavaScript

Online PHPFiddle: http://phpfiddle.org/

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement