I'm looking for some kind of Nav tab (vertical) that allows it to be populated by SQL. For example, in the SQL table there would be a column for title (which is the title of the tab) and a column for the contents of the tab.
I have tried building one myself, but I have no idea how to fit it in a nav bar because usually I'd do a while loop to populate something with SQL, but because nav's have two things that need populating (the <li>
and the <div>
bits), I am unsure of how to do it.
Thanks.
Edit:
<ul>
<?php
$query = tep_db_query("select * table1");
while ($row = mysql_fetch_assoc($query)) {
echo '<li><a href="#tabs-' . $row['tabid'] . '">' . $row['tabtitle'] . '</a></li>'
}
?>
</ul>
<?php
$query2 = tep_db_query("select * table1");
while ($row = mysql_fetch_assoc($query2)) {
echo '
<div id="tabs-' . $row['tabid'] . '">
<p> ' . $row['tabcontent'] . ' </p>
'
}
?>