Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

breadcrumb script needed

Posted on 2007-11-17
3
Medium Priority
?
237 Views
Last Modified: 2010-08-05
Hi,
I've got a lot of php files in the root folder of my site, I want to build a navigation that when a user clicks on different links the breadcrumb show the proper navigation where they are on the site. I dont want to display the file names, just text that i will put in. does anybody know a good script to do this?
0
Comment
Question by:markmchugh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Expert Comment

by:steelseth12
ID: 20304398
You want to put in what links / name is going to display on every page ?
Can you explain how you would like it to work ?
0
 

Author Comment

by:markmchugh
ID: 20304504
for example, i have the hompage, index.php, for this i will display 'home' in the breadcrumb

then the user can select 4 different pages, page1.php, page2.php, page3.php, page4.php

for each of these i want to display the name correspnding to the content, which is "jobs" or "adverts" or "news" or "latest updates"

then each  of these will go to another page, which i will read from a database
0
 
LVL 20

Accepted Solution

by:
steelseth12 earned 2000 total points
ID: 20304533
Not sure if this is what you are looking for ... let me know.
$nav = array("home"=>"index.php","news"=>"page1.php");
 
$navication = breadcrumps ($nav);
 
print $navication;
 
function breadcrumps ($nav) {
 
	$r = "";
	
	$i=0;
	
	foreach($nav as $name=>$link) {
 
		$r .= ($i?" -> ":"")."<a href='".$link."'>".$name."</a>";
		
		$i++;
	}
	
	return $r;
 
}

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question