I have an input like this:
$input = 'GFL/R&D/50/67289';
I am trying to get to this:
GFL$2fR$26D$2f50$2f67289
So far, the closest I have come is this:
echo filter_var($input, FILTER_SANITIZE_ENCODED, FILTER_FLAG_ENCODE_LOW)
which produces:
GFL%2FR%26D%2F50%2F67289
How can I get from the given input to the desired output and what sort of encoding is the result in?
By the way, please note the case sensitivity going on there. $2f
is required rather than $2F
.