$json = file_get_contents("../data/account/acc.json");
$jsonFile = json_decode($json, true);
else if (!empty($emailr) && !empty($passwordr) && !empty($namer)) {
if (empty($jsonFile[$emailr])) {
echo "Svobodno";
$content = ["$emailr" => "$passwordr"];
$contentJson = json_encode($content);
file_put_contents($json,$contentJson);
}
else {
echo "Такой Email уже зарегестрирован";
}
}