I've been struggling on my own for a while with this issue and thought maybe someone here could help. Basically, I'm running into problems because I use an AJAX script to keep the page from reloading on each request, but my requests ( using GET ) must inlcude a variable and a value, for example:
$artist = "<a href=\"?a=$encartist\">$aname</a>";
$encartist only represents the urlencode'd artist name. The problem is some artists have special characters like ê,à, etc.. and I can't use a preg_replace that replaces these by let's say ê for ê because the ampersand in it awaits ( as I've understood it ) for a new variable, like in ?a=something&t=something. Whatever the reason is, it won't work. So I was wondering if you guys had something to let's say replace those special character (ê,à,è, etc) into hexdec's like %26 (amp) or whatever.
Thanks in advance!