I have two fields (at minimum) that both have the same name attribute. Using a little jQuery, the user can add more text boxes using jQuery's .clone()
feature. Every possible input they add will have the same name attribute as the first two.
I want to try to use php to create a comma separated list of every input value after the form is submitted.
$competitor_names = $_POST['competitor-name'];
$competitorList = '';
foreach($competitor_names as $competitorList) {
$competitorList = $competitorList.', ';
}