i am using rawurlencode function but that is not working when i click on url url remian same dont change why here my code where m applying urlencode function m also using .hatcess rewrite rules is any problem becoz of that ?
or please let me know what is good way that i can give this symbol - i my url for finish spaces in url
and then finish this - inserting that variable in next file
how this work ?
mean my exact variable is this Movie Name
but in url it shows like this without space Movie_name
but becoz m getting this variable finish _ from movie name before getting value

$name = $_GET['name'];
include "inc.php";
$que2 = "SELECT * FROM album where cat='$name' order by mname asc" ;
$exe2 = mysql_query($que2);
while($get2 = mysql_fetch_array($exe2)){
        echo '<tr>';
echo "<td width='250'><a href='".rawurlencode($get2['mname']).".htm'>".$get2['mname']."</a></td> ";

        echo '</tr>';



I do not really understand your question.

What is being output now and what do you want to output instead?

What exactly is the url (the value of $get2[‘mname’]) before encoding and after encoding?

my question is simply that how i can finish spaces in my url and replace that spaces with thi sign _ and which thing i replace with this _ how i again clean that query
for example

i am passing a variable which is exactly a movie name like this
THE TERMINATOR this is variable which m passing
i want that when it show in url the space between VARIABLE finish and it shows like
but because of _ my variable name change so i want that it change only in url not in real which m passing on page thanks :slight_smile:

You need to use str_replace() for this.

echo “<td width=‘250’><a href='”.str_replace(“_”, " ", rawurlencodeCOLOR=#007700).“.htm’>”.$get2[‘mname’]."</a></td> ";[/COLOR]

I think it is the english that’s the trouble understanding, not the simplicity of the question.

thanks for remembering this function