0) { $kprod=$keepaData['products'][0]; if (isset($kprod['eanList']) && count($kprod['eanList'])>0) { $provider['fields']['ean']=$kprod['eanList'][0]; $provider['fields']['barcode']=$kprod['eanList'][0]; } if (isset($kprod['upcList']) && count($kprod['upcList'])>0) { $provider['fields']['upc']=$kprod['upcList'][0]; $provider['fields']['barcode']=$kprod['upcList'][0]; } $provider['fields']['hazmatType']=$kprod['hazardousMaterialType']; } } print json_encode($provider,true); ?>