2

I have a string that is stored in a MySQL database (joomla) and starts with the below. Does anyone know what type of string this is and how I can decode it to an array in PHP? It looks similar to JSON but I am unsure.

a:4:{s:7:"Enabled";s:3:"yes";s:9:"StoreData";a:3:{i:1;a:9:{s:2:"id";s:1:"1";s:7:"Enabled";s:3:"yes";s:4:"Name";a:1:{i:1;s:13:

1 Answer 1

6

its serialized string you have to unserialize it, manual - http://php.net/manual/en/function.unserialize.php

$your_string = unserialize($encoded_string)

where $encoded_string is the string from your db

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.