Salve a tutti,
devo aggiungere un secondo valore a questo script per inoltrare oltre al valore letterale della sottocategoria anche un valore numerico per fare un confronto in una Select su mysql.
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]\"".",";
// dovrei riuscire a passare il seguente valore . "\"$nt[objectID]\"".",";
}
$str=substr($str,0,(strLen($str)-1)); // Removing the last char , from the string
echo "new Array($str)";
//
?>
grazie mille per eventualil suggerimenti.