<?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变量在list-item上应用活动类?
答案 0 :(得分:0)
<li class="<?php if(isset($tabs)){ echo 'active'; } ?>">
<a href="#authors" data-to....and so on