Question: This doesn't work, what I want it to do is go through the posts until there are no more item\_name1 and they increment to item\_name2 - item\_name3 ect.... does not spit out an error, just doesn't do what it's suppose to, checking if someone are here sees one. Thanks

```
if(isset($_POST['item_name1'])){
    for($i = 1; $i < 9999; $i++) {
    if(isset($_POST['item_name$i'])){
    do this thing
    }
    else{
    $i = 10000;
    }
    }
    }

```

Answer: 
Change `'item_name$i'` to double quotes `"item_name$i"`

```
if(isset($_POST['item_name1'])){
    for($i = 1; $i < 9999; $i++) {
        if(isset($_POST["item_name$i"])){
            do this thing
        }
        else{
            $i = 10000;
        }
    }
}

```
You are using single quote to wrap variable `$i`

Change`if(isset($_POST['item_name$i'])){` to `if(isset($_POST["item_name$i"])){`