<?php $str = 'This is an encoded string'; echo base64_encode($str); ?>
<a href="print-billing?pid=<?php echo base64_encode($rec['pat_uniq_id']); ?>">Print</a>