$12 = $_POST['1']; $n = count($paslaugos); $i = 0; while ($i < $n) { echo "{$12 [$i]}"; mysql_query("insert into bla_bla (bla) values ('bla bla')"); $i++; }