title: how to check for a linked string inside an array?
body: <p>I have an array, let us say, <code>$breadcrumb = array("home" , "groups", "Create content", "some other element" "so on");</code> I want to check if it contains a string "Create content" and then unset the string, but my problem is that "Create content" is a link (anchored) and not just a plain string, I tried <code>in_array()</code>, but not successful.  How do I look for it, to make it more clear? </p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
  function phptemplate_breadcrumb($breadcrumb) {
      if (!empty($breadcrumb)) {
          if(in_array("Create content",$breadcrumb)){
              foreach($breadcrumb as $key =&gt; $value){
                  if("Create content" == strip_tags($value)){
                      unset($breadcrumb[$key]);
                  }
              }
          }
      }
      return '&lt;div class="breadcrumb"&gt;'. implode(' › ', $breadcrumb) .'&lt;/div&gt;';
  }
  </code></pre>
  
  <p>Note: I know it can be done anyway if I ommit <code>in_array()</code> check but I don't want to loop through the array unecessarily, if the <code>'Create content'</code> is not in the array.</p>
  
  <p>Edit: actual array is: </p>
  
  <pre><code>array(
  [0]=&gt;home
  [1]=&gt; groups
  [2]=&gt; my group
  [3]=&gt; Create content
   )
  </code></pre>
  
  <p>here <code>'Create content'</code> may occupy any position.
  Note: all elements are links (anchored).</p>