Is it possible to get a variable name and use it as a string?
Situation:
I have a form full of inputs when I send the pass with your name and value right, but I need to also update them in the DB using its correct id to insert, in the input the value is used to pass urls. so I was thinking of giving the id in the name then getting Array( "id_1"=>"http://exemplo.com")
. But I need the ID to insert into the correct DB line.
<?php
for ($i = 0; $i < $nomeDasTabelas['value']; $i ++) {
$aux = $i + 1;
echo '<div class="object">
<form method="GET" action="index.php">
<div class="grade">
<input type="hidden" name="serie" value="'.$aboutSerie[0].'">';
for ($is = 0; $is < $valorDeLinks[$i]; $is ++) {
$auxs = $is + 1;
$tabelaDeIds = $idDosLinks[$i];
$idDoLink = $tabelaDeIds[$is];
$btndel = '&btn=btndel&tab=' . $nomeDasTabelas[$i] . '&id=' . $idDoLink;
echo ($is % 4 == 0) ? '<br>' : "";
echo '<label for="txtboxtp' . $aux . 'ep' . $auxs . '">Ep' . $auxs . '|</label>
<input id="txtboxtp' . $aux . 'ep' . $auxs . '" type="text" class="textbox" name="' . $is . '" value="http://">
<a href="index.php?serie=' . $aboutSerie[0] . $btndel . '"><button class="btndel" type="button" name="btndel" title="Excluir"><img src="../imgsys/icon_del.png" alt="Del" title="Excluir"></button></a>
<input type="hidden" name="ep'.$is.'" value="'.$idDoLink.'">';
}