I am using the following array and function in the template for my website. It works great, but I want to to be better. I would to make it so the last item displayed looks differently than the others, but I have been unable to figure out how to distinguish the last item.
When displayed, the crumbs look like: SITENAME » RANDOM » ITEM I would like ITEM to look differently. Can anyone tell me how to modify the select ITEM? // CRUMBS ARRAY $crumbs = array( array( "RANDOM", "RANDOM_URL" ), array( "ITEM", "ITEM_URL" ) ); // CRUMBS FUNCTION function breadCrumbs($crumbs) { if ( count($crumbs) > 0 ) { $spacer = " <span style=\"color:#94cf42;font-size:15px;font-weight:bold;\">»</span> "; $breadCrumbs = "<a href=\"URL/\">SITE_NAME</a>\n"; foreach( $crumbs as $crumb ) { if ( count($crumb) == "2" ) { $breadCrumbs .= "$spacer<a href=\"$crumb[1]\">$crumb[0]</a>\n"; } } echo "<!-- ####################### BREADCRUMBS STARTS HERE ####################### -->\n"; echo "<span class=\"breadcrumbs\">\n"; echo $breadCrumbs; echo "</span>\n"; echo "<!-- ######################## BREADCRUMBS ENDS HERE ######################## -->\n"; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php