I'm trying to encode acute accent letters in PHP. I used rawurlencode, but it doesn't work for me. I want to encode ó to %25C3%25B3 for right url. Any ideas ho开发者_运维知识库w can this be done?
Time to time, I use this in my projects, with success:
<a href="teste.php?var=<? echo urlencode(htmlentities("ó p á é"));?>">teste</a>
<?
$var = html_entity_decode($_GET['var']);
echo $var;
?>
精彩评论