Escape URL String PHP

<?php echo rawurlencode(html_entity_decode($your_string_here)); ?>
Benrobin