<?php
$aCustomers = [[
'id' => '2953',
'id_suscriber' => '1',
'company_name' => 'SOMAB',
'company_fullname' => '',
'address1' => 'Rue des Pois, 25',
'address2' => '',
'country' => 'CH',
'zipcode' => '1234',
'locality' => 'Nyon',
'phone' => '',
'fax' => '',
'mail' => '',
'url' => '',
'language' => '',
'notice' => '',
'activity' => 'Fabrication d\'appareillage électrique basse tension.'
],[
'id' => '2953',
'id_suscriber' => '1',
'company_name' => 'SOMAB',
'company_fullname' => '',
'address1' => 'Rue des Pois, 25',
'address2' => '',
'country' => 'CH',
'zipcode' => '1234',
'locality' => 'Nyon',
'phone' => '',
'fax' => '',
'mail' => '',
'url' => '',
'language' => '',
'notice' => '',
'activity' => 'Fabrication d\'appareillage électrique basse tension.'
]];
$aCustomers = array_map(fn($i) => array_intersect_key($i, ['company_name'=>'x', 'country'=>'x', 'locality'=>'x', 'phone'=>'x', 'fax'=>'x', 'mail'=>'x']), $aCustomers);
print_r($aCustomers);
- Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
- Array
(
[0] => Array
(
[company_name] => SOMAB
[country] => CH
[locality] => Nyon
[phone] =>
[fax] =>
[mail] =>
)
[1] => Array
(
[company_name] => SOMAB
[country] => CH
[locality] => Nyon
[phone] =>
[fax] =>
[mail] =>
)
)
- Output for 7.3.0 - 7.3.33
- Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in /in/0leMa on line 39
Process exited with code 255. - Output for 7.2.0 - 7.2.34
- Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/0leMa on line 39
Process exited with code 255.
preferences:
148.98 ms | 408 KiB | 5 Q