1
In my program I search the table data and add in a array v_patr
and then I add this array
in var w_a
:
<html>
<select multiple size="7" name="cb_Patr" style="width:300">
<?
$w_querybusca="SELECT * FROM public.sai_cad_patr_seri WHERE
sai_cad_patr_seri.fk_seq_cara_peri = '$arr_w_param[17]'";
$w_queryresultado=f_class_conecta_bd($w_querybusca);
$w_indice = 0;
while($w_registro = pg_fetch_object($w_queryresultado))
{
print('<option value="'.$w_registro->tx_num_patr.'">'.trim($w_registro->tx_num_patr).'</option>'."\n");
print("<SCRIPT language=javascript>
v_patr[$w_indice] = \"$w_registro->tx_num_patr,$w_registro->tx_num_seri\";
w_a = v_patr[$w_indice];
</SCRIPT>");
$w_indice++;
}
?>
</select>
But I have a second search after. So I will reuse v_patr that was added in w_a to get element 1 of the array.
<select multiple size="7" name="cb_Seri" style="width:300">
<?
for($i=0;$i<=$w_indice;$i++)
{
//print('<option value="'.$i.'">'._[$i].'</option>'."\n");
}
?>
</select>
But I don’t know how to take w_a elements that were created in a JS inside php and assign it to: print('<option value="'.$i.'">'.w_a[$i].'</option>'."\n");