Код: Выделить всё
[0] => Array
(
[n1:ProductWithTermPricingOptions] => Array
(
[n1:ProductName] => Customer will provide modem
[n1:PricingOptions] => Array
(
[n1:Priority] => 600
[n1:PricingOptionCode] => LCTL_SA_MDM_NONE_LCTL:NONE:MODEM:IN:CON:SA:na:na:NONE:NONE:-1:-1:NONE:LCTL:NONE:0:na:NONE:A:PO:na:0:NULL:NULL:NULL
[n1:ProductMonthlyCharge] => $0.00
[n1:PromoMonthlyCharge] => $0.00
[n1:ProductActivationCharge] => $0.00
[n1:ProductActivationChargeDescription] => Array
(
)
[n1:ContractLength] => Array
(
)
(
)
(
)
[n1:ProductDisclaimer] => Array
(
)
)
)
Код: Выделить всё
public static function searchArrayKeybyValue(array $array, $search) {
foreach ( new RecursiveIteratorIterator ( new RecursiveArrayIterator ( $array ) ) as $key => $value ) {
if ($search === $value)
return $key;
}
return "N/A";
}
Подробнее здесь: https://stackoverflow.com/questions/195 ... namespaced