Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create breadcrumb trail

Status
Not open for further replies.

ad2

Technical User
Dec 31, 2002
186
US
ANyone know how to create a breadcrumb trail for a website?
 
Yes...are you using a server-side language?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I would echo the array??? Sorry, new to PHP
 
I would parse the array and decide which entries to display... and then I would create proper <a href> links for them before echoing to the page.

I expect that if you put together a complete description of what you want to do, and included any relevant details about your requirements, then the nice folks over at the PHP forum forum434 would be able to help.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Thanks. I'll check that forum out.
 
I want typical folder tree display:

Home > Human Resources > Benifits

Page the user currently is on is vacation.html which resides in the benifits folder.

I think I need an array of the folders. Then some how include the array on each page??? Then echo where the users is based on the array??
 
Here's something I cooked up earlier...
Code:
<?
	$script = trim($_SERVER["SCRIPT_NAME"]);
	$myArr = explode("/", $script);
	$fullDepth = count($myArr);
	$html = '<a href="/">Home</a>';
	for ($loop=1; $loop<$fullDepth-1; $loop++) {
		$html .= ' &gt; ';
		$html .= '<a href="/'.$myArr[$loop].'/">'.ucfirst($myArr[$loop]).'</a>';
	}
	$html .= ' &gt; ';
	$html .= '<b>'.$myArr[$loop].'</b>';
	
	echo $html;
?>
It's not strictly HTML... although it does output HTML [smile]

Enjoy,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
I think I need to move this to the suggested PHP forum. Thanks to all for your input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top