我使用此函数传递详细信息,我通过直接通过预定义数组来测试它,但是当我在函数内访问数组时,所有返回值都为NULL,而不是我的值设置。PHP Array传递函数
$this->send_member_email($order=array(
'order_name' => 'D',
'billing_firstname' => 'D',
'billing_lastname' => 'mcc',
'billing_email' => '[email protected]',
'billing_address' => 'd',
'billing_city' => 'al',
'billing_postcode' => 'c i',
), "[email protected]", true);
我那么这里访问它:
$member_data = array(
'member_no' => $membership_no,
'member_firstname' => $order->billing_firstname,
'member_secondname' => $order->billing_lastname,
'member_address' => $order->billing_address,
'member_city' => $order->billing_city,
'member_postcode' => $order->billing_postcode,
'member_country' => $order->billing_country,
'member_timestamp' => gm_time('datetime'),
);
难道我格式化阵列错误的或者是代表我的疏忽。任何帮助将非常感激。
编辑:
这就是它记录作为值到DB:
VALUES ('fd310a396f8c9', NULL, NULL, NULL, NULL, NULL, NULL, '2016-06-08 11:10:36')
使用'$顺序[ 'billing_firstname'] '它的数组不是对象 – Saty