Jump to content

Recommended Posts

Hi everyone. 

 

I'm actually posting this because it took me ages to work it out and I figured others might benefit from it. It may not be the slickest way of making a breadcrumb trail for website navigation, but it's ideal for what I need. None of the other web examples did what I wanted, so hopefully you'll find this useful too. Just use it as an include:

 

<div><a href="<?php echo $root;?>index.php">Whatever Site Name You Like </a> 
<?php $crumbs = explode("/",$_SERVER["REQUEST_URI"]);
		$crumb_count=0;
		$breadcrumb_root=$root;
		$my_path=trim($root,'/');
foreach($crumbs as $key=>$crumb){

	
	#assign each link a number:
	$crumb_num=$key;
	#echo $crumb_num;
	
	#if the crumb number is not 0:
	if($crumb_num!='0'){
		#set the crumb root:
		$breadcrumb_root.='/'.$crumb;
		$my_path.='/'.$crumb;
		?> - <a href="<?php echo $my_path;?>"><?php 
			#remove any variables:
			$crumb_no_q=explode("?",$crumb);
			$crumb=$crumb_no_q[0];
			$crumb=str_replace('_',' ',$crumb);
			$crumb=ucwords(str_replace('.php','',$crumb));
			echo $crumb; ?></a><?php 
	}
}
?></div>

 

 

Link to comment
https://forums.phpfreaks.com/topic/274996-php-breadcrumbs/
Share on other sites

Our Website Will Provide You 70 Off With paul smith bags paul smith bags,paul smith shoes, etc.Free Ship Now and Free Return No Way paul smith bags,100 Satisfaction Guarantee!

 

 

 

We they all are have stressful jobs today and being that they are likewise dressed could possibly be the final thing everywhere over the all of our minds that it is certainly plausible perform everyday. Spending precious time enchanting dressing rising and finding a multi functional handy outfit and for the occasion looks a little as though a multi function while you responsibility too the majority concerning our way of life Dressing up as well as for an all in one be sure too instance a multi functional romantic date,is usually that really irritating. Do all your family members find a resource box a multi functional tad baffling regarding what fashion accessories True Religion Store paul smith shoes, outfits and footwear all your family members in the event that decide to put all around the Keeping track relating to going to be the latest fashions and being that they are up-to-date allowing an individual styling isn8217t anybody8217s pastime. If all your family members is always that the ask my hand personally it8217s difficult to learn more about me to educate yourself regarding keep tabs everywhere over the hottest design craze all around the world?In case the respond for more information about any relating to going to be the above mentioned questions has to be that 8216affirmative8217,all your family then might get rid of the your concern having to do with Style on the basis of recruiting a personal buyer Personal client fashion stylist Louis Vuitton Outlet, personal stylist, are all synonym names all of these are utilized interchangeably and have no less than one thing throughout the common Moncler Outlet paul smith shoes, Fashion. Personal client will go down going to be the anxiety and stress significantly and enables make living far a lot better as well as all your family members To be the case fashionable and looking renowned tends to be th FFSDKA122F

 

air jordan 2012 Air Jordan 11 (XI) Black Red 2012 (Pblow) Epic Look Kic

 

air max 2012

 

ghd outlet ghd sale abetmenting

 

ralph lauren sale

 

air max 90

Link to comment
https://forums.phpfreaks.com/topic/274996-php-breadcrumbs/#findComment-1415316
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.