php - Working with ampersands in $_GET functions -
if have url asdf.com/index.php?a=0&b=2, using $_get a
0 , b
2. however, term put single $_get function has ampersand in already, a=steak&cheese. there way make ampersands work without $_get variable thinking job ends when ampersand shows (therefore not pulling entire term)?
urlencode()
&
turns %26
.
if need make query string out of parameters, can use http_build_query()
instead , url encode parameters you.
on receiving end, $_get
values decoded php, query string a=steak%26cheese
corresponds $_get = array('a' => 'steak&cheese')
.
Comments
Post a Comment