title: PHP Dynamic Breadcrumb
body: <p>I got this code from someone and it works very well, I just want to remove the link from the last element of the array:</p>
  
  <pre><code>//get rid of empty parts
  $crumbs = array_filter($crumbs);
  
  $result = array();
  $path = '';
  foreach($crumbs as $crumb){
      $path .= '/' . $crumb;
      $name = ucfirst(str_replace(array(".php","_"),array(""," "), $crumb));
      $result[] = "&lt;a href=\"$path\"&gt;$name&lt;/a&gt;";
  
  }
  
  print implode(' &gt; ', $result);
  </code></pre>
  
  <p>This will output for example:
  Content > Common > File</p>
  
  <p>I just want a to remove the link from the last item - "File" to be just plain text..
  I tried myself to count the array items and then if the array item is the last one then to print as plain text the last item.. but I'm still noob, I haven't managed to get a proper result..</p>
  
  <p>Thank you!</p>