gpt4 book ai didi

php - mysql_fetch_array 并且只有字符串数组键

转载 作者:行者123 更新时间:2023-12-01 00:14:35 27 4
gpt4 key购买 nike

当我尝试 print_r mysql_fetch_array 的 sql 查询时,我得到了这个结果。

Array
(
[0] => 1
[id] => 1
[1] => 2011
[publish_date] => 2011
[2] => Posted
[status] => Posted
[3] => test
[post_title] => test
[4] =>  testy test test testtttttt
[post_text] =>  testy test test testtttttt
[5] => true
[post_comments] => true
[6] => 21
[reviews] => 21
[7] => 1
[network_id] => 1
[8] => 3
[views] => 3
[9] => 0
[comments] => 0
)

我只需要字符串数组键,那么如何将这个结果转换成那个呢?

Array
(
[id] => 1
[publish_date] => 2011
[status] => Posted
[post_title] => test
[post_text] =>  testy test test testtttttt
[post_comments] => true
[reviews] => 21
[network_id] => 1
[views] => 3
[comments] => 0
)

最佳答案

关于php - mysql_fetch_array 并且只有字符串数组键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7440479/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com