$value) { checkQuotation ($value); checkQuotation ($key); $i++; // Ive been helped to build this and im thankfull all Free Software people, and from scorphus and guaxinin from #debian-br@freenode if (is_array($value)) { $i=0; foreach ($value as $key_int => $value_int) { $i++; //Very thankfull to scorphus@#debian-br@freenode $getdata .= " $key like '$value_int' "; if ($i == sizeof ($value_int)) {$getdata .= " OR ";} } $getdata .= " );"; } else { $getdata .= "$key like '$value'"; if ($i != sizeof ($whatever_to_get)) {$getdata .= ", ";} if ($i == sizeof ($whatever_to_get)) {$getdata .= ")";} if ($i == sizeof ($whatever_to_get)) {$getdata .= ";";} } } } $retorno = mysql_query($getdata) or die ("Ocorreu um erro no requerimento de dados: ". mysql_error()); //return ($retorno); //echo ($getdata); // Another scorphus suggestion - Thanks! while ($row_temp = mysql_fetch_array($retorno)) { $return_array[] = $row_temp; } return ($return_array); } function Destroy () { mysql_close($connect); } } elseif ($sgbd == "pgsql") { //include pgsql_params.php // $connect = pgsql function insertdata ($table, $dataarray) { } } } } ?>