is there a way to pull the first variable from a URI without knowing what it is? example uri:
index.php?firstvariable
thanks in advance
$first_get_var = reset($_GET);
superb. that will get the value if im correct can i use:
$firstvarname = array_keys(reset($_GET)); $firstvarname = $firstvarname[0];
hmm not sure how to only get one key instead of them all
$first_get_value = reset($_GET); // returns the first value $first_get_key = reset(array_keys($_GET)); // returns the first key
ah thanks