Last active
March 22, 2017 07:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = array('name' => array( 'error1', 'error2')); | |
$b = array('email' => array('error3', 'error4')); | |
$errors = array_merge($a, $b); | |
$result = array_reduce($errors, function($c, $v) { return array_merge($c, $v); }, array()); | |
print_r($errors); | |
print_r($result); | |
print_r(implode('\n', $result)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.