0

I have two json data:

$old_data = '{"stock_id":"583",
              "stock_date":"2017-03-11",
              "stock_quantity_in":"0",
              "stock_note":"moved to warehouse A}';

$new_data = '{"stock_id":"583",
              "stock_date":"2017-03-11",
              "stock_quantity_in":"3",
              "stock_note":"moved to warehouse B}';

how do I compare them and highlight the differences? Using php or js are welcome

[UPDATE] I think this one is the closest one I need, thanks!

nemuroito
  • 179
  • 2
  • 2
  • 11
  • php would be server side, meaning a POST (page refresh) would be required vs JavaScript – abc123 Oct 02 '17 at 04:20
  • i think this one is the most close one i need : http://code.stephenmorley.org/php/diff-implementation/#styling, thanks! – nemuroito Oct 02 '17 at 05:04

0 Answers0