0
Good afternoon, I have a repetition problem in my code. I was wondering if there is any way to decrease the code that is very extensive due to this. Follows code:
<a href="https://www.comprasnet.gov.br/pregao/fornec/Acompanhar1.asp?prgCod=<?php echo $nova[0]?>&pagina=1&botao=T" target="inframe" onclick="mostrarAtivo(this);"><?php echo ($newuasg[0] . "/" . $newuasg[1])?></a>
<a href="https://www.comprasnet.gov.br/pregao/fornec/Acompanhar1.asp?prgCod=<?php echo $nova[1]?>&pagina=1&botao=T" target="inframe" onclick="mostrarAtivo(this);"><?php echo ($newuasg[2] . "/" . $newuasg[3])?></a>
<a href="https://www.comprasnet.gov.br/pregao/fornec/Acompanhar1.asp?prgCod=<?php echo $nova[2]?>&pagina=1&botao=T" target="inframe" onclick="mostrarAtivo(this);"><?php echo ($newuasg[4] . "/" . $newuasg[5])?></a>
<a href="https://www.comprasnet.gov.br/pregao/fornec/Acompanhar1.asp?prgCod=<?php echo $nova[3]?>&pagina=1&botao=T" target="inframe" onclick="mostrarAtivo(this);"><?php echo ($newuasg[6] . "/" . $newuasg[7])?></a>
<a href="https://www.comprasnet.gov.br/pregao/fornec/Acompanhar1.asp?prgCod=<?php echo $nova[4]?>&pagina=1&botao=T" target="inframe" onclick="mostrarAtivo(this);"><?php echo ($newuasg[8] . "/" . $newuasg[9])?></a>
This is just one part of the code that repeats in this same pattern for another 2000 lines. My problem is in the variable, $nova and $newuasg. Thanks in advance.
I used @Vitor Carnaval’s reply and it worked perfectly.