If you open index.php?test= hallo, then you can access the value with
$_GET['test'].
Your loop now tries to echo $_GET[0] for example, but you need to echo
$_GET['test'] in order to see anything. :-)
If you want to walk through an array, use
foreach ($array as $value)
{
echo $value;
}
>
If you open index.php?test= hallo, then you can access the value with
$_GET['test'].
Your loop now tries to echo $_GET[0] for example, but you need to echo
$_GET['test'] in order to see anything. :-)
>
If you want to walk through an array, use
foreach ($array as $value)
{
echo $value;
}
The difference can be found in indexed arrays (using numbers) or
associative arrays (using texts). Using foreach() this difference is
overcome.
>>
>If you open index.php?test= hallo, then you can access the value with
>$_GET['test'].
>Your loop now tries to echo $_GET[0] for example, but you need to echo
>$_GET['test'] in order to see anything. :-)
>>
>If you want to walk through an array, use
>foreach ($array as $value)
>{
> echo $value;
>}
>
The difference can be found in indexed arrays (using numbers) or
associative arrays (using texts). Using foreach() this difference is
overcome.
Comment