PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Being a 'Newie', (I'm 59 and started out in paper tape and punch cards) I thought I play around a bit and try to learn about php.
So here's my problem/question:
I have a $_POST coming in, and I want to change it from:
for ($item = 1; ; $item++)
{
$_POST["project"].$item1;
so I end up the first time with
$_POST["project1"];
becuase that's variable beng passed to me in the $_POST: $_POST["project1"];
etc.
}
I am being passed in separate variables $_POST["project1"], $_POST["project2"], $_POST["project3"], etc. but I don't know how many there will be; hence my FOR loop, so I thought maybe the best idea was to try to add a number to each $_POST...