You can usually use something like this:
<form action="example.php" method="POST">
<input type="text" name="file_name[]">
<input type="text" name="file_name[]">
<input type="text" name="file_name[]">
to collect data under the same name, and access it in PHP like:
$file_name = $_POST["file_name"];
echo $file_name[0]; //first occurrence
echo $file_name[2]; //third occurrence
but when it comes to generating dynamic fields with jQuery, like this:
$("#example_table").append("<tr><td><input type="text" name="file_name[]"></td></tr>");
and submitting it with standard submit button within POST form, the outcome differs. Only the last occurrence gets passed but the array indexes represent consecutive letters of such, not exact, indicated field as above.
The question is, why and how to fix it?