【问题标题】:How to convert Mysql BLOB into PHP array [duplicate]如何将Mysql BLOB转换为PHP数组[重复]
【发布时间】:2016-01-07 10:28:35
【问题描述】:

我已经建立了包含以下原始数据的字段 BLOB 的数据库。

<i>a:34:{s:5:"stype";s:1:"1";s:9:"studentid";s:4:"1105";s:18:"duration_of_course";s:7:"2 years";s:22:"applicant_name_surname";s:15:"Tsering Kunchok";s:17:"course_or_subject";s:16:"Computer </i>

如何在 PHP 一维中检索数据?

【问题讨论】:

标签: php mysql serialization


【解决方案1】:

就这样做

<?php

var_dump(unserialize('a:34:{s:5:"stype";s:1:"1";s:9:"studentid";s:4:"1105";s:18:"duration_of_course";s:7:"2 years";s:22:"applicant_name_surname";s:15:"Tsering Kunchok";s:17:"course_or_subject";s:16:"Computer"') );

不要忘记加载用于序列化的依赖项...

【讨论】:

  • 它现在可以工作了。酷...
猜你喜欢
  • 2014-10-21
  • 2016-08-15
  • 1970-01-01
  • 2014-04-30
  • 2013-06-20
  • 2021-05-03
  • 1970-01-01
  • 1970-01-01
  • 2015-04-06
相关资源
最近更新 更多