well, the problem with that is most of my files are called 'index.php' cheers, - Sebastian
----- Original Message ----- From: "Diego Fulgueira" <[EMAIL PROTECTED]> | Sebastian wrote: | > hello all. | > | > this code creates dynamic breadcrumbs, ie: home > site nav > community | > | > I am having a bit of a time trying to make it so it doesn't hyperlink the | > current page thats being viewed, any help is appreciated. | > | > <? | > | > $LocationMappings = array( | > "view.php" => "site map", | > "company" => "about", | > "articles" => "news" | > ); | > | > function LocatorLine() | > { | > global $SCRIPT_NAME, $LocationMappings; | > $file=1; // 1 Doesn't show the file name, 0 Does | > | > $locationArray = explode("/",$SCRIPT_NAME); | > $locationHref = ""; | > | > echo '<span class="smalltext">:: <a href="/">main page</a></span>'; | > for($i=1; $i<count($locationArray)-$file; $i++) | > { | > if ( !empty($LocationMappings[$locationArray[$i]]) ) { | > $locationText = $LocationMappings[$locationArray[$i]]; | > } | > else { | > $locationText = ucwords($locationArray[$i]); //Uppercase | > letters | > } | > $locationHref .= "/" . $locationArray[$i]; | > echo " <b>»</b> <a | > href=\"$locationHref\">$locationText</a>"; | > } | > echo "\n"; | > } | > | > LocatorLine() | > ?> | > | > cheers, | > - Sebastian | | I would have an array for directories and another for files. Putting all in | the same array makes it messy. Cheers. | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php