我有这样的结果。
Array
(
[0] => Array
(
[nisdt] => Error while providing NIS DT Contact the help team
[nisn] => NISN must be at least 6 characters
)
[1] =>
)
然后我想将其更改为这样
Array
(
[0] => Error while providing NIS DT Contact the help team
[1] => NISN must be at least 6 characters
)
警告:array_values()期望参数1为数组,布尔值在C:\ xampp \ htdocs \ parenting \ index-2.php在第71行中给出
如何解决错误,这是我的代码。
function Return_Values($array)
{
return (array_values($array));
}
$return_val = Return_Values($tes_validation);
foreach($return_val as $data)
{
$flip = Return_Values($data);
print_r($flip);
}
foreach($tes_validation as $data)
{
$flip = is_array($data) ? Return_Values($data) : $data;
print_r($flip);
}