title: check if cart item has the same property
body: <p>Am using the codeigniter cart library, but now the client wants users to only be able to checkout items from one category at at a time because of some issues with their payment gateway.
  Current the site has a single checkout logic for all categories.
  When a users adds an items to the cart, i have an array like this</p>
  
  <pre><code>Array
  (
      [d8df18561040f3d9bd9868f5c5aaa7c2] =&gt; Array
          (
              [rowid] =&gt; d8df18561040f3d9bd9868f5c5aaa7c2
              [id] =&gt; MYU_SC1
              [qty] =&gt; 1
              [price] =&gt; 500
              [name] =&gt; WAEC Scratch Card
              [service_image] =&gt; assets/img/waec.jpg
              [service_category] =&gt; scratch_cards
              [subtotal] =&gt; 500
          )
  
      [99483fe03da62c9e98ce71232998f447] =&gt; Array
          (
              [rowid] =&gt; 99483fe03da62c9e98ce71232998f447
              [options] =&gt; Array
                  (
                      [size] =&gt; 36
                      [colour] =&gt; N/A
                  )
  
              [id] =&gt; 80433426a546064bf5f8d09a6e7fdabc
              [qty] =&gt; 1
              [price] =&gt; 5000
              [name] =&gt; Green Vee Jeans
              [service_image] =&gt; http://localhost/myunivacity/uploads/apparels/IMG_0425.JPG
              [service_category] =&gt; apparels
              [subtotal] =&gt; 5000
          )
  
  )
  </code></pre>
  
  <p>how i do check if whether or not the items in the cart have same value for "service_category" element?. Thanks for the help</p>