I have an input form with 7 drop downs pairs (Item/Item Colour).
I want to loop through to check if they are empty ($_POST['items1'], $_POST['items2'].... $_POST['items7']).. same thing for item colour.
I wanted to loop through, assign my loop variable to a variable with text
$item_val = "items".$i;
then check if $_POST['$item_val'] is empty. I have tried ${$item_val}, nothing seems to work.
Is there anyway to achieve this?
Thanks