RE: how to keep spaces in parameters in URL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



http://php.net/manual/en/function.urlencode.php

Should get you what you need :)

Dan

-- 
http://chrome.me.uk
 
-----Original Message-----
From: Bing Du [mailto:bdu@xxxxxxxxxxx] 
Sent: 24 April 2006 22:42
To: php-general@xxxxxxxxxxxxx
Subject:  how to keep spaces in parameters in URL?

Hello,

==
<?php
$name = 'foo bar';

echo "<a href=/index.php?name=". $name .">Foo Bar</a>";
?>
==

Then the URL showed up at the bottom border of the browser has 'name=foo'.

What should I do to have 'name=foo bar' in the URL?  I tried
htmlspecialchars but did not see any difference.

I'd appreciate any help.

Bing

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


__________ NOD32 1.1504 (20060424) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux