base64_encode — Encodes data with MIME base64
string base64_encode ( string $data );
$data - The data to encode.
The encoded data, as a string or FALSE on failure.
<?php $str = 'base64 encoded string'; echo base64_encode($str); ?>