0
<?php 
  $tabs = array($auth_name, $pub_name, $lang_name); 
?>
<li class="active">
  <a href="#authors" data-toggle="tab">Authors</a>
</li>
<li>
  <a href="#languages" data-toggle="tab">Languages</a>
</li>
<li>
  <a href="#publishers" data-toggle="tab">Publishers</a>
</li>

如何根据 isset 变量在列表项上应用活动类?

4

1 回答 1

0
<li class="<?php if(isset($tabs)){ echo 'active'; } ?>">
<a href="#authors" data-to....and so on
于 2013-08-31T22:38:43.783 回答