N
N
neudachniyproger2016-10-06 15:16:36
PHP
neudachniyproger, 2016-10-06 15:16:36

How to parse this json a:4:{s:3:"RUR";s:1:"1";s:3:"UAH";s:3:"2.7";s:3:"USD"; s:4:"39.5";s:3:"EUR";s:4:"49.8";}?

How to parse this json string a:4:{s:3:"RUR";s:1:"1";s:3:"UAH";s:3:"2.7";s:3:"USD" ;s:4:"39.5";s:3:"EUR";s:4:"49.8";} The string is stored in the database. I saw this code on many engines, for example, taken from the moguta store

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2016-10-06
@Kraky

This is a serialized array with data in php. To parse this string, you need to return a deserialized json from the server. For example, process it like this:
php:
This will be json, which you can use on the client side through js.

R
romy4, 2016-10-06
@romy4

php: unserialize()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question