PHP base64_encode()

base64_encode — Encodes data with MIME base64

Function

string base64_encode ( string $data );

Parameters

$data - The data to encode.

Return values

The encoded data, as a string or FALSE on failure.

Example

<?php
$str = 'base64 encoded string';
echo base64_encode($str);
?>

Github

See also: