In my program I search the table data and add it to a array v_patr
and then I add that array
to 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 survey later. So I'm going to reuse the v_patr that was added in w_a to get element 1 from 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 do not know how to get the elements of w_a that was created in a JS inside the php and assign it to: print('<option value="'.$i.'">'.w_a[$i].'</option>'."\n");