What are breadcrumbs?
Well quite simply, in web page terms this refers to a list of links (usually at the top) that appear on a web page to tell the user where they are in the structure of the website they are viewing. This makes navigating backward and forward so much easier as they have the ability to skip directly back through whole categories, rather than just using the browser’s back button.
Example
- Copy the code below, save it in a file called
breadcrumbs.phpand upload it to your site. This will print out a simple unordered list (<ul>) of the parent directories by directory name. The only edits you may wish to make to this file is to change the$ul_id='crumbs';line if you wish to change theidof the<ul>. If you wish to add a background image or border etc to the<li>simply select it as#crumbs li{}and style.</code><? $ul_id='crumbs'; $bc=explode("/",$_SERVER["PHP_SELF"]); echo '<ul id="'.$ul_id.'"><li><a href="/">Home</a></li>'; while(list($key,$val)=each($bc)){ $dir=''; if($key > 1){ $n=1; while($n < $key){ $dir.='/'.$bc[$n]; $val=$bc[$n]; $n++; } if($key < count($bc)-1) echo '<li><a href="'.$dir.'">'.$val.'</a></li>'; } } echo '<li>'.$pagetitle.'</li>'; echo '</ul>';</pre> ?> This is some more usefull code <pre><? $url = $_SERVER['REQUEST_URI']; echo $url; echo "<br>"; $array = explode("/",$url); echo $array[2]; ///which folder would you want to access ? echo "size of array = ".sizeof($array)."<br>"; ?><code>A script to insert in the HTML where you want the breadcrumbs to appear:
Edit the URI to point to where you saved the include file (once this is done it never needs to be changed again). Edit, ‘Insert Page Title’ to add the page title to the end of the breadcrumbs.
</code><? $pagetitle="Insert Page Title"; include("http://www.yourdomain.com/breadcrumbs.php"); ?>Note: It would be useful to automatically print the page
<title>as the last crumb but PHP cannot interogate the DOM. Javascript would be required which we didn't think appropriate as nothing would be returned if Javascript was turned off.






This is really helpful information.
This is the simpliest way to create breadcrumb. Nice article.
purab.wordpress.com rocks! I found a lot of new information on purab.wordpress.com and I liked it a lot. Good job! I will be back.
Superb posting, this is very similar to a site that I have. Please check it out sometime and feel free to leave me a comenet on it and tell me what you think. I’m always looking for feedback.
I don’t agree with everything in this article, but you do make some very good points. Im very interested in this subject matter and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment. Feel free to check out my website sometime and let me know what you think.
This is a good article, I was wondering if I could use this piece of writing on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.
The servers then exchange the messages among one another, making that messages available to readers beyond the original server.
This is a good write-up, I was wondering if I could use this piece on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.
Thanks for such a kick but post, you rock!
You areawesome! This blog is really good. I truly hope a lot more men and women examine this and get what youre declaring, simply because let me tell you, its crucial stuff. I under no circumstances wouldve considered about it by doing this unless Id operate into your blog. Thanks for placing it up. I wish you might have fantastic accomplishment.
Great page! I enjoy your blog, would it be okay to utilize it for feed purposes?
Thanks for taking the time to talk about this, I feel fervently about this and I take pleasure in learning about this topic. Please, as you gain information, please update this blog with more information. I have found it very useful.
Nice post! You truly have a wonderful way of writing which I find captivating! I will definitely be bookmarking you and returning to your blog. In fact, your post reminded me about a strange thing that happened to me the other day. I’ll tell you about that later…
Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!
Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader
Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
I’ve been checking your blog for a while now, seems like everyday I learn something new
Thanks
I REALLY liked your post and blog! It took me a minute bit to find your site…but I bookmarked it. Would you mind if I posted a link back to your post?
Interesting read, perhaps the best article iv’e browse today. We learn everyday cheers to you!
I would like to say “wow” what a inspiring post. This is really great. Keep doing what you’re doing!!
This post makes a lot of sense !
I’ve been checking your blog for a while now, seems like everyday I learn something new
Thanks
Great read. Thanks for the info!
Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader
Interesting read, perhaps the best article iv’e browse today. We learn everyday cheers to you!