# Difference between two jsons

**URL:** <https://www.phphelp.com/t/difference-between-two-jsons/34979>\
**Category:** General PHP Help\
**Created:** [August 27, 2022, 9:43pm UTC](https://www.phphelp.com/t/difference-between-two-jsons/34979 "2022-08-27T21:43:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![exeq](https://www.phphelp.com/letter_avatar_proxy/v4/letter/e/4af34b/32.png) [@exeq](https://www.phphelp.com/u/exeq)\
**Post date:** [August 27, 2022, 9:43pm UTC](https://www.phphelp.com/t/difference-between-two-jsons/34979/1 "2022-08-27T21:43:13Z")

</div>

Hello, I’m tryng to see what changed since last time logged in taken from a json, and doing a new one… Somewhere in the code theres a foreach printing a table

I think I almost solve it on my own. Solved

---

<div class="post-metadata">

**Author:** ![phdr](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/91b2a8/32.png) [@phdr](https://www.phphelp.com/u/phdr)\
**Post date:** [August 29, 2022, 5:38am UTC](https://www.phphelp.com/t/difference-between-two-jsons/34979/2 "2022-08-29T05:38:00Z")

</div>

Here’s a fun fact about using files to hold data. You MUST use file locking and error handling logic if you are actively storing and retrieving data in files, so that concurrent access won’t corrupt your data.

On the other hand, databases automatically perform the necessary locking to allow concurrent access without damaging data.

You should be storing active data in database tables, not files.
