Hi,
I got a code who give class name different if rowid = 1, but if row('id') 1 is deleted the class is not appear.
I want the class use only on first row.
Here is my code
Any help will be useful.
Thanks
I got a code who give class name different if rowid = 1, but if row('id') 1 is deleted the class is not appear.
I want the class use only on first row.
Here is my code
Code:
while($row = mysqli_fetch_array($result))
{
if ($row['id'] == '1'){
?>
<li><a id="<?php echo $row["urlName"] ?>Tab" class="active" href="#<?php echo $row["urlName"] ?>Content"><?php echo $row["title"] ?></a></li>
<?php } else { ?>
<li><a id="<?php echo $row["urlName"] ?>Tab" href="#<?php echo $row["urlName"] ?>Content"><?php echo $row["title"] ?></a></li>
}
}
Any help will be useful.
Thanks