Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在数组中添加字符串?_Php - Fatal编程技术网

Php 如何在数组中添加字符串?

Php 如何在数组中添加字符串?,php,Php,我有这个阵列: $address = apply_filters( 'woocommerce_my_account_my_address_formatted_address', array( 'first_name' => get_user_meta( $customer_id, $name . '_first_name', true ), 'last_name' => get_user_meta( $custom

我有这个阵列:

$address = apply_filters( 'woocommerce_my_account_my_address_formatted_address', array(
                'first_name'  => get_user_meta( $customer_id, $name . '_first_name', true ),
                'last_name'   => get_user_meta( $customer_id, $name . '_last_name', true ),
                'country'     => get_user_meta( $customer_id, $name . '_country', true )

            ), $customer_id, $name );
输出为:

约翰

银币

美国

我想成功:

名字:约翰

第二名:银


国家:美国

到目前为止你都试过什么?你被困在哪里了?'first\u name'=>“first\u name:”。获取用户\u meta($customer\u id,$name.'u first\u name',正确),谢谢你的帮助!在您尝试过的列表中!