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:
foreach($list as $r)
{
$row_color = ($row_count % 2) ? $color1 : $color2;
$size2 = $r[2];
echo "<tr>
<td id=\"id\"><span id=\"non_sorting_header\">" .$r[0]. "</span></td>
<td id=\"name\"><span id=\"non_sorting_header\">" .$r[1]. "</span></td>
<td id=\"speed\"><span id=\"sorting_header\">" .kMGTB2($size2). "</span></td>
<td id=\"download\"><span id=\"sorting_header\">" .$r[3]. " Gb<br />per month</span></td>
<td id=\"contract\"><span id=\"sorting_header\">1<br />month</span></td>
<td id=\"info\"><span id=\"non_sorting_header\">".$r[5]."</span></td>
<td id=\"buy\"><span id=\"non_sorting_header\">".$r[4]."<br />".$r[6]."</span></td>
</tr>";
$row_count++;
}
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....
I cannot figure out a slick way to do this...any help would be appreciated!