limiting array results returned
<p>Hi I would like to limit the results returned depending on what type of product a user selects, $r[1] is the type of product with the array:</p>

<pre><code>    foreach($list as $r) 
{ 
$row_color = ($row_count % 2) ? $color1 : $color2; 
$size2 = $r[2]; 
 echo "&lt;tr&gt;
        &lt;td id=\"id\"&gt;&lt;span id=\"non_sorting_header\"&gt;" .$r[0]. "&lt;/span&gt;&lt;/td&gt;
        &lt;td id=\"name\"&gt;&lt;span id=\"non_sorting_header\"&gt;" .$r[1]. "&lt;/span&gt;&lt;/td&gt;
        &lt;td id=\"speed\"&gt;&lt;span id=\"sorting_header\"&gt;" .kMGTB2($size2). "&lt;/span&gt;&lt;/td&gt;
     &lt;td id=\"download\"&gt;&lt;span id=\"sorting_header\"&gt;" .$r[3]. " Gb&lt;br /&gt;per month&lt;/span&gt;&lt;/td&gt;
        &lt;td id=\"contract\"&gt;&lt;span id=\"sorting_header\"&gt;1&lt;br /&gt;month&lt;/span&gt;&lt;/td&gt;
        &lt;td id=\"info\"&gt;&lt;span id=\"non_sorting_header\"&gt;".$r[5]."&lt;/span&gt;&lt;/td&gt;
        &lt;td id=\"buy\"&gt;&lt;span id=\"non_sorting_header\"&gt;".$r[4]."&lt;br /&gt;".$r[6]."&lt;/span&gt;&lt;/td&gt;
      &lt;/tr&gt;"; 
$row_count++; 
}
</code></pre>

<p>So if the user enters 'banana' then the function will find all instances within the array where $r[1] starts with the word 'banana' - start is key as it could be 'banana 1' 'banana 2' etc....</p>

<p>I cannot figure out a slick way to do this...any help would be appreciated!</p>
