<?php

//debug($old->data);
$data = json_decode($old->data);
$old->date->i18nFormat(\IntlDateFormatter::FULL, 'Europe/Paris');
//debug($old->date->nice());


foreach ($output as $sakey => $savalues) {

    echo '<h1>' . $sakey . '</h1>';

    echo '<table>';
    echo '<tr><td></td><td>' . $now->nice() . '</td><td>' . $old->date->nice() .'</td></tr>';
    foreach ($savalues as $key => $value) {
        echo '<tr><td>' . $key . '</td><td>' . $value . '</td><td>' . $data->$sakey->$key . '</tr>';
    }
    echo '</table>';
}

//echo $text;

