Base64 Encode Decode - Php

How to encode/decode base64 string using php code?

Snippet Code

Rate this page :
  [ 0 votes]

The following php code can be used to encode and decode the base64 string. Here, base64_encode and base64_decode function is used to do encode and decode.

<?php $str = ''; echo base64_encode($str); $str = 'aHNjcmlwdHMuY29t'; echo "</br>"; echo base64_decode($str); ?>


Ask Questions

Ask Question