Continuo con i miei esperimenti...
in questo modo funziona a metà... perché nel menu select mi stampa in successione sia il valore subcategoria che quello objectID invece io vorrei che il valore objectID fosse nascosto all'utente...
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)){
//$str2=$str2 . "\"$nt[subcategoria]\"".",";
$str=$str . "\"$nt[subcategoria]\"".","."\"$nt[objectID]\"".",";
//$str=$str . "<option value=$nt[objectID]>$nt[subcategoria]</option>".",";
//$str=$str ."\"<option value='.$nt[objectID].'>'.$nt[subcategoria].'</option>".",";
}
$str=substr($str,0,(strLen($str)-1)); // Removing the last char , from the string
echo "new Array($str)";
//
?>
qualcuno che mi illumina?