Base64 encode function in php


<?php
$string = "This is my first application in php";
$encode_data = base64_encode($string);
echo $encode_data;

/*Output */
Result :- VGhpcyBpcyBteSBmaXJzdCBhcHBsaWNhdGlvbiBpbiBwaHA=
?>