Question { 3880 }
how can I use bread crumb in PHP ?
Answer
create a session array variable in the homepage or index page,
$_SESSION['page_name']= array();
index.php :-
$_SESSION['page_name'][]=array('title'=>'Home','page'=>'index.php');
contact_us.php :-
$_SESSION['page_name'][]=array('title'=>'Contact Us
','page'=>'contact_us.php');
similarly for all the pages.
where you want to display the bread crumb just paste this code.
foreach($_SESSION{'page_name'] as $brdcrum)
{
echo '
href="'.$brdcrum['page'].'">'.$brdcrum['title']." >> ";
}