Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $data = json_decode('{"start": "22:51", "hora": "24:35"}');
- //$data = json_decode('{"start": "22:51", "hora": "24:35"}', true);
- $start = strtotime($data->start);
- $hora = strtotime($data->hora);
- //$start = strtotime($data['start']);
- //$hora = strtotime($data['hora']);
- print round(abs($start - $hora)/60, 2) . " minutos";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement