Solved

breadcrumb script needed

Posted on 2007-11-17
3
233 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 500 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

635 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