将数据放入URL

i have a problem with my PHP code, i've trying to put some information i get from a database into the URL so later on i can use $_GET.

The problem is use this code:

foreach ($get_wh_list as $key => $value) 
{
    echo $value['id'] . "<br />";
    echo "<a href='?action=hot&&id='" . $value['id'] . "'>" . $value['wh_title'] . "</a><br />";
}

Right so as you can see i'm printing the id value, when i run this page the id shows up, but when i click a link the id doesn't appear in the URL. any ideas? I really can't think of why for the life of me.

Thanks for the help.

Remove the extra "&"

foreach ($get_wh_list as $key => $value) 
{
  echo $value['id'] . "<br />";
  echo "<a href='?action=hot&id='" . $value['id'] . "'>" . $value['wh_title'] . "</a><br />";
}

Put only one '&' in url instead of two '&&'

Example :

echo "<a href='?action=hot&id='" . $value['id'] . "'>" . $value['wh_title'] . "</a><br />";

Maybe it is better to use a tested and working function for that stuff

Use http_build_query(); to Serialize an Array to Query String