I just have a question.

I have a group of textbox with the same name. (name = "quantity[]")

How can I retain the values of the form after submit? For example, I have 5 textbox with the same name. I filled out 4 of them and submitted the form. I want to display an error that a field is empty and retain the values that I put before I submitted the form.

I can do it if the textbox names are different. But if they have the same, I can't make it work.

```
<input type="text" name="quantity[]" value="<?php if(!empty($_POST['quantity'])) echo $_POST['quantity'];?>">

<input type="text" name="quantity[]" value="<?php if(!empty($_POST['quantity'])) echo $_POST['quantity'];?>">

<input type="text" name="quantity[]" value="<?php if(!empty($_POST['quantity'])) echo $_POST['quantity'];?>">

<input type="text" name="quantity[]" value="<?php if(!empty($_POST['quantity'])) echo $_POST['quantity'];?>">

<input type="submit" name="submit">

```

Thanks for your help php people. Your help is appreciated.