Se aggiungo un valore nt nel menu a tendina mi stampa sia la sottocategoria (subcategoria) che il numero del campo associato (objectID)... io invece devo avere la stampa della sottocategoria e inviare il valore numerico per effettuare la query di confronto...

Codice PHP:
<?php
$cat_id
=$_GET['cat_id'];
require 
"config.php";
$q=mysql_query("select * from hsubcat_it where idcat='$cat_id'");
echo 
mysql_error();
$myarray=array();

$str="";

while(
$nt=mysql_fetch_array($q)){
//$str=$str . "\"$nt[subcategoria]\"".",";
$str=$str "\"$nt[objectID]\"".","."\"$nt[subcategoria]\"".",";
}
$str=substr($str,0,(strLen($str)-1)); // Removing the last char , from the string

echo "new Array($str)";


//

?>