Autreau
Autreau

Reputation: 3

How to get value from serialized output

How to get concrete value from following string stored in mysql?

{"3":"123456789","4":"ABCDEF"}

I am trying to extract these values and store them separately to other columns like COLUMN_A with value 123456789, COLUMN_B with...

Upvotes: 0

Views: 23

Answers (1)

mitch
mitch

Reputation: 2245

Use json_decode function.

print_r(json_decode('{"3":"123456789","4":"ABCDEF"}'));

Upvotes: 1

Related Questions