Home  >  Article  >  Backend Development  >  把二维数组变为字符串

把二维数组变为字符串

WBOY
WBOYOriginal
2016-06-13 12:57:54941browse

把二维数组变成字符串

<br />
Array<br />
(<br />
    [0] => Array<br />
        (<br />
            [0] => www.movso.us<br />
            [1] => 快播电影<br />
        )<br />
<br />
    [1] => Array<br />
        (<br />
            [0] => www.kbysq.com<br />
            [1] => 最新电影<br />
        )<br />
<br />
    [2] => Array<br />
        (<br />
            [0] => www.bbying.com<br />
            [1] => 网址大全<br />
        )<br />
<br />
<br />
    [3] => Array<br />
        (<br />
            [0] => www.tccok.com<br />
            [1] => 甜菜影视,<br />
        )<br />
<br />
    [4] => Array<br />
        (<br />
            [0] => www.dy527.com<br />
            [1] => 在线下载<br />
        )<br />
<br />
)<br />
<br />


怎么把这个二维数组变成字符串插入进去,用的时候在提取出来变成二维数组

我是搜索一个词,然后生成列表 如果有更好的办法也能说下哈
------解决方案--------------------
serialize($arr);

取出来时,用 unserialize() 还原 

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