<table class="table table-striped table-hover table-bordered">
    <thead>
        <tr>
            <th> # </th>
            <th> For </th>
            <th> Operation</th>
            <th> Year </th>
            <th> Surgeon </th>
            <th> Notes </th>
        </tr>
    </thead>
    <tbody>
        {assign var=i value=1}
        {foreach $allpastsurgical as $myallpastsurgical}
        <tr>
            <td> {$i} </td>
            <td>{if $myallpastsurgical->for_husband == 1 }  Husband {else} Wife {/if} </td>
            <td>{$myallpastsurgical->operationname}</td>
            <td> {$myallpastsurgical->phsurgicalyear}</td>
            <td> {$myallpastsurgical->phsurgicalsurgeon}</td>
            <td> {$myallpastsurgical->surgicalnote}</td>
        </tr>
        {capture assign=i}{$i+1}{/capture}
        {/foreach}
</table>
