Location: PHPKode > scripts > Tab Control > tab-control/Example.subtab.php
<?php
include 'tab_control.php';

$tab = new tab_control();

$tab->add_tab(0,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=0','Welcome');
$tab->add_tab(1,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=1','Categories','Example');
$tab->add_tab(2,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=2','Programs');
$tab->add_tab(3,'Example.subtab.php?tabid='.$_GET[tabid].'&subtabid=3','File');

$tab->set_current($_GET[subtabid]);

$tab->set_style( array('width'    =>"96%",
                       'border'   =>"#D9D9D9",
                       'bgcolor'  =>"#F1F1F1",
                       'current'  =>"#FFFFFF",
                       'uncurrent'=>"#F1F1F1"
                       ));
                       
$tabs = $tab->get_out('<center>Welcome in tab control</center>');
$tab = new tab_control('ltr');
$tab->set_current($_GET[tabid]);
$tab->add_tab(0,'Example.subtab.php?tabid=0','Tab 1',$tabs);
$tab->add_tab(1,'Example.subtab.php?tabid=1','Tab 2','Example Tab 2');
$tab->add_tab(2,'Example.subtab.php?tabid=2','Tab 3','Example Tab 3');
echo $tab->get_out('<center>'.$tabs);
?>
Return current item: Tab Control