title: Get the array value that contains keywords
body: <p>Using array_filter I am able to show my arrays data using a search form (text input). But I am not able to show all the array containing the keywords.</p>
  
  <p>For example I am searching keyword '<strong>Product 1 test</strong>'</p>
  
  <p>It should show all product with name <strong>Product</strong>, <strong>1</strong>, <strong>test</strong> and product with description that contains <strong>Product</strong>, <strong>1</strong>, <strong>test</strong></p>
  
  <p>My array looks like this:</p>
  
  <pre><code>$p_arrays[] = array('name'=&gt; 'Product 1','description' =&gt; 'Test Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'location' =&gt; 'A city', 'type' =&gt; 'Type 1', 'status' =&gt; 'new', 'tags'=&gt;'', 'page_url'=&gt;'p1.html', 'image'=&gt;'products/assets/images/1/prod-image.jpg');
  
  $p_arrays[] = array('name'=&gt; 'Product 2','description' =&gt; 'Test Donec eleifend quam neque, ut mollis massa aliquet id.', 'location' =&gt; 'B city', 'type' =&gt; 'Type 1', 'status' =&gt; 'under', 'tags'=&gt;'', 'page_url'=&gt;'p2.html', 'image'=&gt;'products/assets/images/2/prod-image.jpg');
  
  $p_arrays[] = array('name'=&gt; 'Product 3','description' =&gt; 'Nam non tristique mi.', 'location' =&gt; 'A city', 'type' =&gt; 'Type 3', 'status' =&gt; 'new', 'tags'=&gt;'', 'page_url'=&gt;'p3.html', 'image'=&gt;'products/assets/images/3/prod-image.jpg');
  
  $p_arrays[] = array('name'=&gt; 'Product 4','description' =&gt; 'Vestibulum accumsan dolor id orci gravida viverra.', 'location' =&gt; 'C city', 'type' =&gt; 'Type 2', 'status' =&gt; 'new', 'tags'=&gt;'', 'page_url'=&gt;'p4.html', 'image'=&gt;'products/assets/images/4/prod-image.jpg');
  </code></pre>
  
  <p>What I have tried so far..</p>
  
  <pre><code>if (isset($_POST['keyword-input']) &amp;&amp; $_POST['keyword-input']!=='') {
  $keywords= ($_POST['keyword-input']);
  
  $p_arrays = array_filter($p_arrays, function($p) use ($keywords) {
      return (stripos(($p['description']), $keywords) !== false ) || (stripos(($p['name']), $keywords) !== false );
  
  });
  </code></pre>
  
  <p>Any Ideas?</p>