Skip to content Skip to sidebar Skip to footer

How To Change Class="current" Location In A List?

im sorry for the poor title, i dont know how to explain it. You see i have already created my panel tabs with the help of
    ,
  1. and css. it is working perfectly bu

Solution 1:

Do it manually:

class="<?phpecho ($_GET['namelist'] == 'a' ? 'current' : NULL); ?>"
class="<?phpecho ($_GET['namelist'] == 'b' ? 'current' : NULL); ?>"
class="<?phpecho ($_GET['namelist'] == 'c' ? 'current' : NULL); ?>"
class="<?phpecho ($_GET['namelist'] == 'd' ? 'current' : NULL); ?>"

Or do it intelligently:

<?phpforeach (range('a', 'z') as$letter) {
?><liclass="<?phpecho ($_GET['namelist'] == $letter ? 'current' : NULL); ?>"><ahref="index.php"><span>#</span></a></li><? } ?>

Post a Comment for "How To Change Class="current" Location In A List?"