String with spaces

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
spacebiscuit
Forum Contributor
Posts: 390
Joined: Mon Mar 07, 2005 3:20 pm

String with spaces

Post by spacebiscuit »

Hi,

I am trying to pass a variable which is a string with spaces in via the html header (?)


<href=index.php?var="String with spaces">Link</a>

It only seems to pass the the part before the space. I also triued writing the string into a variable and passing that but the same happens.

Thanks,

Rob.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

look at urlencode()
spacebiscuit
Forum Contributor
Posts: 390
Joined: Mon Mar 07, 2005 3:20 pm

Post by spacebiscuit »

----that work's great thanks!

Rob.
Post Reply