По
print_r($arFields);
получаю
Array ( [CATALOG_QUANTITY] => 100 [~CATALOG_QUANTITY] => 100 [CATALOG_QUANTITY_RESERVED] => 0 [~CATALOG_QUANTITY_RESERVED] => 0 [CATALOG_QUANTITY_TRACE] => Y [~CATALOG_QUANTITY_TRACE] => Y [CATALOG_QUANTITY_TRACE_ORIG] => D [~CATALOG_QUANTITY_TRACE_ORIG] => D [CATALOG_CAN_BUY_ZERO] => Y [~CATALOG_CAN_BUY_ZERO] => Y [CATALOG_CAN_BUY_ZERO_ORIG] => D [~CATALOG_CAN_BUY_ZERO_ORIG] => D [CATALOG_NEGATIVE_AMOUNT_TRACE] => Y [~CATALOG_NEGATIVE_AMOUNT_TRACE] => Y [CATALOG_NEGATIVE_AMOUNT_ORIG] => D [~CATALOG_NEGATIVE_AMOUNT_ORIG] => D [CATALOG_SUBSCRIBE] => Y [~CATALOG_SUBSCRIBE] => Y [CATALOG_SUBSCRIBE_ORIG] => D [~CATALOG_SUBSCRIBE_ORIG] => D [CATALOG_AVAILABLE] => Y [~CATALOG_AVAILABLE] => Y [CATALOG_WEIGHT] => 0 [~CATALOG_WEIGHT] => 0 [CATALOG_WIDTH] => 0 [~CATALOG_WIDTH] => 0 [CATALOG_LENGTH] => 0 [~CATALOG_LENGTH] => 0 [CATALOG_HEIGHT] => 0 [~CATALOG_HEIGHT] => 0 [CATALOG_MEASURE] => 5 [~CATALOG_MEASURE] => 5 [CATALOG_VAT] => 0.00 [~CATALOG_VAT] => 0.00 [CATALOG_VAT_ID] => 1 [~CATALOG_VAT_ID] => 1 [CATALOG_VAT_INCLUDED] => Y [~CATALOG_VAT_INCLUDED] => Y [CATALOG_PRICE_TYPE] => S [~CATALOG_PRICE_TYPE] => S [CATALOG_RECUR_SCHEME_TYPE] => D [~CATALOG_RECUR_SCHEME_TYPE] => D [CATALOG_RECUR_SCHEME_LENGTH] => 0 [~CATALOG_RECUR_SCHEME_LENGTH] => 0 [CATALOG_TRIAL_PRICE_ID] => [~CATALOG_TRIAL_PRICE_ID] => [CATALOG_WITHOUT_ORDER] => N [~CATALOG_WITHOUT_ORDER] => N [CATALOG_SELECT_BEST_PRICE] => Y [~CATALOG_SELECT_BEST_PRICE] => Y [CATALOG_PURCHASING_PRICE] => [~CATALOG_PURCHASING_PRICE] => [CATALOG_PURCHASING_CURRENCY] => [~CATALOG_PURCHASING_CURRENCY] => [CATALOG_TYPE] => 1 [~CATALOG_TYPE] => 1 [CATALOG_BUNDLE] => N [~CATALOG_BUNDLE] => N )
Как вывести количество: CATALOG_QUANTITY, в данном случае 4.
а
$A = count($arFields[CATALOG_QUANTITY]);
echo $A;
выдает 1.