在问之前,让我告诉你两件事<我知道这对某人来说很东东,但对我来说很难
2)我在创建WordPress模板时遇到了这个问题。这就是我在这里发帖的原因
问题:当我打印以下代码时
<?php
$home_starting_player_names = rwmb_meta( \'pb_home_starting_player_options\', array( \'multiple\' => true ) ); ?>
<?php
foreach ( $home_starting_player_names as $home_starting_player ){?>
<li role="presentation">
<aside class="starting-player-image"><?php echo get_the_post_thumbnail($home_starting_player); ?></aside>
<aside class="starting-player-name"><?php echo get_the_title($home_starting_player); ?></aside>
<aside class="starting-player-number"><?php $var_dumps = get_post_meta($home_starting_player);
print_r ($var_dumps);
?></aside>
<?php }
?>
它的输出如下(我在这里只写了一个):
Array (
[_edit_last] => Array ( [0] => 1 )
[_edit_lock] => Array ( [0] => 1477596212:1 )
[pb_squad_number] => Array ( [0] => 10 )
[pb_player_date_birth] => Array ( [0] => 2016-09-02 )
)
现在我想显示这个键的值
[pb_squad_number]
.我是说10个。请帮我查一下密码。