每当我对以数组形式输入的表单求和时,我都会得到以下错误。

只有当我提交表单时才会出现问题。
我的输入数组是这样的:

发布于 2017-07-21 15:52:37
看起来您正在将输入作为数组类型进行传递。htmlentities()仅适用于字符串类型。这
<td><input type="text" name="type[]" value="{{ old('type') }}" class="form-control"></td>应该是
<td><input type="text" name="type" value="{{ old('type.0') }}" class="form-control"></td>type.0将只返回数组中的第一项。
https://stackoverflow.com/questions/45231911
复制相似问题