Home  >  Article  >  Backend Development  >  数组怎么放入数据库中(数据库gbk编码)

数组怎么放入数据库中(数据库gbk编码)

WBOY
WBOYOriginal
2016-06-13 12:41:32940browse

数组如何放入数据库中(数据库gbk编码)

本帖最后由 cnaaa8 于 2013-06-30 19:10:30 编辑 现有一个数组,数组中的内容不定,所以抛弃了implode分割数组的方法转化为字符串在保存,因为数据库编码是gbk的,将数组转化为json格式的也放弃了,json必须为utf-8格式的,如果转换为json后在用iconv转换为gbk,插入数据库,那么在读取时,iconv在反转换某些数据时会报错,序列化的话听说在用有些数组时饭序列化时转不过来会报错,所以也放弃了,别的还有什么方法呢
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn