Foreach döngüsü ve $ _GET ile sorun

0 Cevap

Ben çok basit bir foreach döngüsü var

foreach($tv as $id => $channel) {
$ID = $_GET['ID'];
if($ID == $id){$class = "currentt";}
echo '<a href="http://www.mysite.com/tst.php?ID='.$id.'"     class="'.$class.'">'.$channel.'</a><br>';
 }

With url query, with every click the current class repeated. How can avoid this? Thanks alot.

0 Cevap