I'm trying to access POST variables which have numbers at the end by using a loop. Here's a snippet:
for ($i = 1; $i <= $count; $i++) {
$number=$_POST['itemnum$i'];
$item=$_POST['newstext$i'];
echo "<br>i=$i, number=$number, item=$item";
}
This gives me blanks for $number and $item every time. When I do a print_r($_POST); I get the list and the variables are there (itemnum1, newstext1, itemnum2, newstext2, itemnum3 ... ). I just don't know how to reference them.