Jump to content


Photo

Replacing a blank space in a URL with %20


  • Please log in to reply
2 replies to this topic

#1 emexinc

emexinc
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 17 August 2006 - 06:12 AM

...i have the following php code...keep in mind this is part of a larger piece of code...

echo "<p align=\"left\"><a onFocus=\"if(this.blur)this.blur()\" href=\"picked.php?previous=".$_GET['letter']."&amp;show=".$row['title']."&amp;key=".$row['key']."\" target=\"songs\"><font class=\"sgu\" id=\"sgu\">".$row['title']."</font></a></td>\n";

...the red part of code has a tendancy to have spaces, which i don't want...the blue does as well, but i do want blank spaces and not %20...firstly, i've tried numerous tips from everywhere and i can't seem to filter out the red code to replace blank spaces with %20...keeping in mind that i would not like to have the blue code effected by this...any help or direction is greatly appreciated...thanks for your time...

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 17 August 2006 - 06:14 AM

urlencode().

#3 emexinc

emexinc
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 18 August 2006 - 01:43 AM

...i love one word answers...aside from the fact that i was one word away from getting it right...haha...thanks a lot thorpe...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users