Escape URL String php

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