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=
?>