【发布时间】:2014-02-01 12:45:38
【问题描述】:
我有 4 个数组用于输入错误,例如:
$username_errors=array();
$email_errors=array();
$password_errors=array();
$errors=array();
我想合并$errors 数组中的所有数组值,并计算$errors 是否为空,然后继续。
提前致谢。
【问题讨论】:
-
好吧,您可以先向我们展示您尝试过的东西。无论如何,你应该看看
array_merge函数php.net/manual/en/function.array-merge.php -
您可以使用
array_push()。喜欢array_push($errors,$username_errors);
标签: php