Q: special charcter with url i 've using a htmlentities for removing special character in request url but is not work.
the code correspond to call my url is:                                                                                                                             
 <select name="article">
 <option value='Tout' >Tout</option>  
 echo '<option value="'.htmlentities($rowact['article']).'" ';
if(...))
{
{echo 'selected';} 
}
echo'>'.htmlentities($rowact['article']).' </option>';      

url: http://mondomain.com/+Bar%252C+caf%25C3%25A9%2 
Any suggestion please, thanks in advance

A: htmlentities is not for encoding urls
use urlencode to encode special characters in urls

A: using htmlentities you can convert html entities but to encode url parameters you must have to use urlencode function.
<select name="article">
 <option value='Tout' >Tout</option>
 echo '<option value="'.urlencode($rowact['article']).'" ';
if(...))
{
{echo 'selected';} 
}
echo'>'.htmlentities($rowact['article']).' </option>';
urlencode description

A: htmlentities convert all applicable characters to HTML entities (see http://www.php.net/htmlentities).
If you want to allow only certain characters, use a regular expression such as this:
preg_replace("/([^a-zA-Z0-9\ ]*)/","",$rowact['activite'])

This example allows only letters (upper and lower case), numbers and spaces.
For more informations check here: http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
Edit:
Even if it's not the best possible solution, you could replace specific special characters using preg_replace, as in the following code:
$find = array();
$find[] = '/[\"]/';
$find[] = '/[\&]/';
$find[] = '/[\<]/';
$find[] = '/[\>]/';

$replace = array();
$replace[] = "&quot;";
$replace[] = "&amp;";
$replace[] = "&lt;";
$replace[] = "&gt;";

preg_replace($find,$replace,$rowact['activite']);

