<? $pathd = $_SERVER['PHP_SELF']; $pathd = preg_split('%\/%', $pathd, -1, PREG_SPLIT_NO_EMPTY); $traild = $root . '/'; if (count($pathd) <= 1) { // we're in the site root, no links are needed } else { // create home link echo "<a href='$traild' title='Home Page'>Home</a>\n"; for($i=0; $i<(count($pathd)-1); $i++) { // more links needed to be created $traild .= $pathd[$i] .'/'; $titled = ucwords(str_replace('_', ' ', $pathd[$i])); echo "→ <a href='$traild' title='$titled'>$titled</a>\n"; } // output current page title $complete_urlname = str_replace('.html', '', $complete_url); $complete_urlname = explode('/', $complete_urlname); $complete_count = count($complete_urlname) -1; $complete_urlname = $complete_urlname[$complete_count]; $complete_urlname= str_replace('-',' ', $complete_urlname); $complete_urlname=ucwords($complete_urlname); echo "→ $complete_urlname \n"; } ?> Just place the script on the page you want the breadcrumbs displayed. You can view the working sample at the top of any of our pages.
Comments
Name
Url (optional)
Message / Comment
What is 1 + 2 =
feel free to enter your url too, it's a free link back to you:
Please keep your comment related to the content on this page.