I get the following data from MySQL by db_query(). The type of the column is BLOB.


How should I process it?


Pass it to unserialize(). That is the string obtained from serialize(), when the argument is the following array.

$array = array(
  'attributes' => array('title' => ''),
  'langcode' => 'zh-hans',

serialize() is the function used from Drupal when the data to save in the database is an array.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.