Exforsys

Free Training

Breadcrumbs in PHP

This is a discussion on Breadcrumbs in PHP within the PHP forums, part of the Programming Talk category; Hi all. Need code for breadcrumbs in PHP. How to write code for Breadcrumbs in PHP? Any one help me? ...

Go Back   Exforsys > Programming Talk > PHP

Exforsys.com

  #1 (permalink)  
Old 04-16-2009, 10:07 PM
Junior Member
 
Join Date: Mar 2009
Posts: 12
chowexfo is on a distinguished road
Breadcrumbs in PHP

Hi all.


Need code for breadcrumbs in PHP. How to write code for Breadcrumbs in PHP? Any one help me?


Thanks,
chow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-23-2009, 09:46 PM
Junior Member
 
Join Date: Nov 2006
Posts: 26
megabyte is on a distinguished road
Hello Try this.This is java script Breadcrumbs code.

Code:
<HEAD>
<script language="JavaScript">
<!-- 
  function breadcrumbs(){
    sURL = new String;
    bits = new Object;
    var x = 0;
    var stop = 0;
    var output = "<div class=topnav><A HREF=/>Hyperdisc</A> &raquo; ";

    sURL = location.href;
    sURL = sURL.slice(8,sURL.length);
    chunkStart = sURL.indexOf("/");
    sURL = sURL.slice(chunkStart+1,sURL.length)

    while(!stop){
      chunkStart = sURL.indexOf("/");
      if (chunkStart != -1){
        bits[x] = sURL.slice(0,chunkStart)
        sURL = sURL.slice(chunkStart+1,sURL.length);
      }else{
        stop = 1;
      }
      x++;
    }

    for(var i in bits){
      output += "<A HREF=\"";
      for(y=1;y<x-i;y++){
        output += "../";
      }
      output += bits[i] + "/\">" + bits[i] + "</A> &raquo; ";
    }
    document.write(output + document.title);
	document.write("</div>");
  }
 // -->
</script>
</HEAD>


<BODY>

<SCRIPT LANGUAGE="JavaScript" TYPE='text/javascript'>breadcrumbs()</SCRIPT>

</BODY>


Thanks,
MegaByte
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Jobs For Software Engineer LAMP (Linux, Apache, MySql, PHP) fomaxtech PHP 0 07-23-2008 06:25 AM
PHP - XCART download error vimaljf PHP 0 04-24-2008 10:42 AM
SQL Server 2005 Driver for PHP techguru PHP 0 10-09-2007 06:53 PM
Php Tutorials and ebooks cybot PHP 1 04-14-2007 03:01 AM
PHP Tutorial - Introduction rachelle PHP 0 06-02-2006 01:40 AM


All times are GMT -4. The time now is 10:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.