이 함수를 사용하여 세부 사항을 전달합니다. 미리 정의 된 배열을 직접 통과하여 테스트합니다. 그러나 함수 내에서 배열에 액세스하면 모든 값이 NULL이 아닌 값으로 반환됩니다. 환경.PHP 배열이 함수로 전달
$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