Passing Variable with "&"

A

Anonymous

Guest
Hi,

i would like to know is there a easy way to pass a variable, for instance "a&b". the link that i created is "http://www.test.com/test.php?ab=a&b", where the value of "ab" is a string of "a&b". I hope this is not confusing...

I thought of a long method, using pregmatch, where i replace the character "&" first, and then replacing it back at the other end...

thanks.
 
Code:
<a href="http://path/page.php?ab='<?php urlencode('a&b')?>'">
 
Sounds like your trying to pass variables from one page to the other where they can be used. If that's what you wanna do then apart from using the
session_start()
function to eliminate that need you could use the header function as in
Header("Location: nextpage.php?letter_a=$a&letter_b=$b")

Hmmmm hope this helps....
 
Back
Top