I\'m trying to understand why, on my page with a query string, the code:
echo \"Item count = \" . count($_GET);
echo \"First item = \" . $_
Nope, it is not possible.
Try this:
file.php?foo=bar
file.php contents:
You get
Array
(
[foo] => bar
)
If you want to access the element at 0, try file.php?0=foobar.
You can also use a foreach or for loop and simply break after the first element (or whatever element you happen to want to reach):
foreach($_GET as $value){
echo($value);
break;
}