Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how can I use bread crumb in PHP ?

Answers were Sorted based on User's Feedback



how can I use bread crumb in PHP ?..

Answer / latha

<?php
session_start();
include("./Breadcrumb.php");
$trail = new Breadcrumb();
$trail->add('Home', $_SERVER['PHP_SELF'], 0);

//Sample CSS
echo "
<style>
#breadcrumb ul li{
list-style-image: none;
display:inline;
padding: 0 3px 0 0;
margin: 3px 0 0 0;
}
#breadcrumb ul{
margin:0;padding:0;
list-style-type: none;
padding-left: 1em;
}
</style>
";

//Now output the navigation.
$trail->output();
?>

Is This Answer Correct ?    0 Yes 0 No

how can I use bread crumb in PHP ?..

Answer / asim shariff

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 '<a
href="'.$brdcrum['page'].'">'.$brdcrum['title']."</a>&nbsp;>>&nbsp;";
}

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More PHP Interview Questions

Who is the father of PHP and explain the changes in PHP versions?

13 Answers   Befree, iMark Group, Netizen,


What is encapsulation in php?

0 Answers  


why header() gives the error like header already sent in php please explain in brief

1 Answers   KMK,


Tell me is it possible to protect special characters in a query string?

0 Answers  


Tell me how to set a page as a home page in a php based site?

0 Answers  


What is the purpose of basename() function in PHP?

0 Answers  


What is mean by an associative array?

0 Answers  


What is the use of "ksort" in php?

0 Answers  


What is the use of "enctype" attribute in a html form?

0 Answers  


What is register_globals in php?

6 Answers   Castling IT, HCL, Intel Soft Solutions, Millennium,


How to find the length of a string?

0 Answers  


How do I find out the number of parameters passed into function?

1 Answers  


Categories