From the journal

Encode and decode URL.

In PHP you can send values by encoding and decoding the URL by using this encoding and decoding method. ```php echo base64 encode(‘I am encoded PHP’); ``` You will get and output something like this.…

Explore this page ↓
Share

In PHP you can send values by encoding and decoding the URL by using this encoding and decoding method.

echo base64_encode(‘I am encoded PHP’);

You will get and output something like this.

VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==

This can be decoded by using

echo base64_decode(‘VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==’);

Output:

I am encoded PHP

When ever you want to send some data via URL you can use this function to encode and decode.

Keep reading