I am posting a form that has many similar fields (artist1, artist2, .... artist20). I am trying to add them to a database but I am not sure how to easily get all of the posted data with out having to write out each one separately. How can I combine an int to a string so that I dont have to write each one out? This is one way I tried that didnt work:
for( $i=0; $i <= 20; $i++ )
{
$artist = $_POST['artist'.$i]
}
I also tried (which didnt work):
for( $i=0; $i <= 20; $i++ )
{
$art = 'artist' . $i;
$artist = $_POST[ $art ];
}