Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何获取包含不同类型变量的数组?_Php_Arrays_Attachment - Fatal编程技术网

Php 如何获取包含不同类型变量的数组?

Php 如何获取包含不同类型变量的数组?,php,arrays,attachment,Php,Arrays,Attachment,我已尝试为发送简历创建动态表单。我已经创建了带有输入字段的html表。这是我的html代码表单: <form action="index.php" method="post" enctype='multipart/form-data' > <table class="table table-bordered table-condensed"> <thead>

我已尝试为发送简历创建动态表单。我已经创建了带有输入字段的html表。这是我的html代码表单:

            <form  action="index.php" method="post" enctype='multipart/form-data' >
            <table class="table table-bordered table-condensed">
                <thead>
                <tr>
                    <th>Name</th>
                    <th>Qualification</th>
                    <th>Year of end</th>
                    <th>Form</th>
                    <th>Document</th>
                </tr>
                </thead>
                <tbody class="EducationPlaces">
                <tr>
                    <td>
                        <input name='edrow[]'  type='text' class='form-control' />
                    </td>
                    <td>
                        <input name='edrow[]' type='text' class='form-control' />
                    </td>
                    <td>
                        <input name='edrow[]' type='text' class='form-control' />
                    </td>
                    <td>
                        <input name='edrow[]' type='text' class='form-control' />
                    </td>
                    <td>
                        <input name='edrow[]' type='file' class='form-control' />
                    </td>
                </tr>

                </tbody>
            </table>
            <input type="submit" value="Save" name="save_file">
            <br>
        </form> 
        <button class="btn btn-primary" onclick="addEducationRow()"> Add row </button>
最终会有两个不同的数组,我不知道如何得到一个数组,其中包含表中的所有数据


你能告诉我解决问题的正确方法吗

$\u文件用于文件$_POST用于$\u POST数据。。只要这样做,
$dataArray=array($\u文件,$\u POST)…最好不要将文件上传与常规数据放在同一格式中。为文件上载创建单独的页面。
    <script type="text/javascript">
    function addEducationRow()
    {
        $("<tr> " +
            "<td>" +
            "<input name='edrow[]' type='text' class='form-control' />" +
            "</td> " +
            "<td>" +
            "<input name='edrow[]' type='text' class='form-control' />" +
            "</td> " +
            "</td> " +
            "<td>" +
            "<input name='edrow[]' type='text' class='form-control' />" +
            "</td> " +
            "</td> " +
            "<td>" +
            "<input name='edrow[]' type='text' class='form-control' />" +
            "</td> " +
            "<td>" +
            "<input name='edrow[]' type='file' class='form-control' />" +
            "</td> " +
            "</tr>").appendTo('.EducationPlaces');
    }
</script>
$file_aray=$_FILES['file'];