Is it possible to change the name of the variable dynamically
e.g.
I want to set these variables on a page:
only I don't know how many of these I will have on the page as the number will be generated from the previous page. could be 4 or 100.PHP Code:$id1 = $_GET['id1'];
$id2 = $_GET['id2'];
$id3 = $_GET['id3'];
$id4 = $_GET['id4'];
etc...
I think i need some kind of loop such as
I want to change $id* to $id1, $id2 ,$id3, $id4 etc...PHP Code:for ($i=1; $i<=$qty; $i++)
{
$id* = $_GET['id*'];
}
depending on the value of $qty
does anyone know if this is even possible? Or if i'm making any sense!



Reply With Quote




Bookmarks