N
N
nikita0710032020-09-05 16:56:28
PHP
nikita071003, 2020-09-05 16:56:28

How to change value in JSON php?

The JSON looks like this:

{"messages_dike":[{"id_message":"17","who_sent":"qwerty","who_get":"krakozybra","message_text":"THIS TEXT SHOULD BE CHANGED","message_type" :"1","message_datetime":"0000-00-00 00:00:00"}]}

After the change it should be:

{"messages_dike":[{"id_message":"17","who_sent":"79197762070 ","who_get":"79067092065","message_text":"OTHER VALUE","message_type":"1","message_datetime":"0000-00-00 00:00:00"}]}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Aetae, 2020-09-05
@nikita071003

json_decode($json, true), change the resulting regular php array, json_encodeback. What problems?
You can still go hardcore str_replace, but it's better not to.

M
MgmZog, 2015-08-19
@entermix

Kranty to her. Almost all nvidia chips (graphics, chipset) from 2006-2008 have a defect, over time funny glitches begin due to chip peeling from the substrate during heating-cooling.
Repair is only a replacement for new chips, released after 2009 and it is not practical.

A
Andrey Ermachenok, 2015-08-19
@eapeap

It looks like a memory problem.
Try manually changing the driver to the "Microsoft Basic Video Adapter" - artifacts, judging by your words, will go away and will not warm up. Will last in this mode for a long time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question