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