Help Me Extract a Value :)
Posted: Mon May 11, 2009 4:03 pm
Ampersands are causing chaos for my pages.
If I don't use "&" in a url, my pages won't validate. If I do, php appends only the "amp;" part to each of my variables.
So, I've devised a solution which is yet to be complete (I need help).
Basically, I'm starting off with ...
$query = str_replace('&', '&', $_SERVER['QUERY_STRING']);
This grabs the entire query and replaces "&" with simply "&".
I need a way to locate specific variable values within this, using a method similar to $_GET.
Is there a $_GET method for strings? If not and a function is necessary, please guide me through it.
The function call should work in a manner such as ...
$myVariable = GetVarValue('Variable_Name');
How?
If I don't use "&" in a url, my pages won't validate. If I do, php appends only the "amp;" part to each of my variables.
So, I've devised a solution which is yet to be complete (I need help).
Basically, I'm starting off with ...
$query = str_replace('&', '&', $_SERVER['QUERY_STRING']);
This grabs the entire query and replaces "&" with simply "&".
I need a way to locate specific variable values within this, using a method similar to $_GET.
Is there a $_GET method for strings? If not and a function is necessary, please guide me through it.
The function call should work in a manner such as ...
$myVariable = GetVarValue('Variable_Name');
How?