if (is_array($json_ary) || is_object($json_ary)) {
foreach ($json_ary as $id => $val) {
if (preg_match('/[A-z0-9]+/' , $_POST['password']))
{
$error = 'Secure enough';
return $error;
} if(strlen($_POST['password'])<8){
$error = "Password must be at least 8 characters";
return $error;
}
if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
$error = "Invalid email address";
return $error;
}
if ($_POST['email'] == $val['email']) {
$emailFound = TRUE;
$error = 'Email already in use';
break;
}
}
foreach ($value as $key){
print_r($key[0]->target_id);
}