Skip to content
Advertisement

PHP How to extract non serialize array into variables

How can I convert the following array stored in my database into a PHP array, and then extract them into PHP variables:

JavaScript

I have been able to use “unserialize()” in other arrays and but this doesn’t seem to work. Also “extract()” only seems to work when it is already in a PHP array not a mySQL array.

Advertisement

Answer

This is a json string to access it as php arrays you must decode it by using json_decode as

JavaScript

When TRUE, returned objects will be converted into associative arrays.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement