$base_string = base64_encode("your-string"); //for base64 encoding
echo base64_decode($base_string); //for base64 decoding
<?php
$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
echo base64_decode($str);
?>
$base_string = base64_encode("your-string"); //for base64 encoding
echo base64_decode($base_string); //for base64 decoding
<?php
$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
echo base64_decode($str);
?>