$row) { if ($account_id && $id !== $account_id) { continue; } $rows[] = [ 'account_id' => $id, 'account_name' => $row['account_name'], 'account_type' => intval($row['account_type']), 'account_currency_code' => $row['account_currency_code'], 'opening_balance' => round(floatval($row['opening_balance']), 2), 'balance' => $row['balance'], 'account_description' => $row['account_description'], 'account_notes' => $row['account_notes'], 'account_created_at' => $row['account_created_at'], 'account_archived_at' => $row['account_archived_at'], ]; } if ($rows) { echo json_encode(['success' => 'True', 'count' => count($rows), 'data' => $rows]); exit(); } $sql = false; // Output require_once "../read_output.php";