fetchArray($q2); echo '

'._('Articolo').': '.$rs2[0]['codice'].' - '.$rs2[0]['descrizione'].'

'; $serials = []; $array = array_column($rs2, 'serial'); foreach ($array as $value) { if (!empty($value)) { $serials[] = $value; } } echo '
{[ "type": "select", "label": "'._('Serial').'", "name": "serial[]", "multiple": 1, "value": "'.implode(',', $serials).'", "values": "query=SELECT serial AS id, serial AS descrizione FROM vw_serials WHERE dir=\'uscita\' AND serial NOT IN (SELECT serial FROM vw_serials WHERE dir=\'entrata\' AND record != \'int-'.$id_record.'\')", "extra": "data-maximum=\"'.count($rs2).'\"" ]}
'; echo '
'; echo ' ';