Home >Backend Development >PHP Tutorial >改键不改值 求优雅的方法

改键不改值 求优雅的方法

WBOY
WBOYOriginal
2016-06-06 20:24:161211browse

<code>[0] => Array
        (
            [id] => 115
            [create_time] => 2小时前
            [content] => XXXXXXXXXXXXXX
        )</code>

除了先插入后删除的方法,有没有比较优雅的方法把这里的id键变成comment_id

回复内容:

<code>[0] => Array
        (
            [id] => 115
            [create_time] => 2小时前
            [content] => XXXXXXXXXXXXXX
        )</code>

除了先插入后删除的方法,有没有比较优雅的方法把这里的id键变成comment_id

没有了, 其他方法都没直接遍历修改的性能好。

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