Hello all - once again I am seeking a wee bit of assitance...
ok. at the moment if a listtype = 3 then it'll create a dropdown list of the product. incidentally if it is = 2 then it creates a product header and if it's = 1 then it shows it as a normal product.
Now I'm probably going about this the wrong way but if I can do it this way then great cos I've kinda got it figured in my head ok... just not in code..
Now, I want to be able to distinguish whether 'listtype' = 3 and 'title' = previous 'title' and previous 'listtype' = 2
this will be to detect the first dropdown item, create a new table row, start the <select> and create the first <option> entry.
Next I want to test if 'listtype' = 3 and 'title' = previous 'title' and 'title' = next 'title'
to just create all the inbetween <option> entries.
and finally test if 'listtype' = 3 and 'title' = previous 'title' and 'title' != next 'title'
to add the final <option>, close the </select> and close the table row.
my curent basic selection is:
elseif ($row['listtype'] == '3')
{
echo '<tr><td> </td><td>';
echo '<select size="1"><option value="';
echo $row['productid'];
echo '">';
echo $row['description'];
echo '</select></td></tr>';
}
as you can see this is just to check I've got the basic syntax right, I'm just not sure how to compare the records. If you need anything else from me in order to help please let me know - I'm here all night...
Thanks
Sheldon