【发布时间】:2020-07-24 01:41:53
【问题描述】:
我需要 dtbl_collection_0、dtbl_collection_1 和 dtbl_collection_3 动态值获取。而且这里也没有固定 0,1,2,3,4,5,...... 这里没有 固定。
请大家帮帮我
Array
(
[user_ID] => 1
[action] => editpost
[originalaction] => editpost
[post_author] => 1
[post_type] => datatable
[original_post_status] => auto-draft
[cur_jj] => 11
[hidden_aa] => 2020
[cur_aa] => 2020
[hidden_hh] => 09
[cur_hh] => 09
[hidden_mn] => 49
[cur_mn] => 49
[original_publish] => Publish
[publish] => Publish
[dtbl_collection_0] => Array
(
[0] => 11
[1] => 22
[2] => 33
)
[dtbl_collection_1] => Array
(
[0] => 44
[1] => 55
[2] => 66
)
[dtbl_collection_2] => Array
(
[0] => 77
[1] => 88
[2] => 99
)
[post_name] =>
[post_mime_type] =>
[ID] => 95
[comment_status] => closed
[ping_status] => closed
)
global $post;
$dtbl_collection = get_post_meta($post->ID,'dtbl_collection',true);
if($dtbl_collection){
foreach ($dtbl_collection as $key => $value) {
}
}
如何为 3 个数组动态键。这是我的代码如何获取它。
【问题讨论】:
-
请将信息添加为文本,而不是图像。这很容易被复制粘贴到问题中。而且您的问题还不清楚,“如何动态键”是什么意思?你想做什么?获取价值?插入值?请添加更多详细信息。
-
好的,我会放@El_Vanja
-
我已经把请检查并帮助我@El_Vanja