Home > Backend Development > PHP Tutorial > 把二维数组成为字符串

把二维数组成为字符串

WBOY
Release: 2016-06-13 13:10:46
Original
1077 people have browsed it

把二维数组变成字符串

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
Array
(
    [0] => Array
        (
            [0] => www.movso.us
            [1] => 快播电影
        )

    [1] => Array
        (
            [0] => www.kbysq.com
            [1] => 最新电影
        )

    [2] => Array
        (
            [0] => www.bbying.com
            [1] => 网址大全
        )


    [3] => Array
        (
            [0] => www.tccok.com
            [1] => 甜菜影视,
        )

    [4] => Array
        (
            [0] => www.dy527.com
            [1] => 在线下载
        )

)


Copy after login


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

我是搜索一个词,然后生成列表 如果有更好的办法也能说下哈

------解决方案--------------------
serialize($arr);

取出来时,用 unserialize() 还原
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template