Mistři v programování na #hovnokod

PHP #4676

Krasna pyramida

if ($predvypln_pocet_kin == 1) {
            $nahrad["{test}"] = $table_test1;
        } elseif ($predvypln_pocet_kin == 2) {
            $nahrad["{test}"] = $table_test1 . $table_test2;
        } elseif ($predvypln_pocet_kin == 3) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3;
        } elseif ($predvypln_pocet_kin == 4) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4;
        } elseif ($predvypln_pocet_kin == 5) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5;
        } elseif ($predvypln_pocet_kin == 6) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6;
        } elseif ($predvypln_pocet_kin == 7) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7;
        } elseif ($predvypln_pocet_kin == 8) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8;
        } elseif ($predvypln_pocet_kin == 9) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9;
        } elseif ($predvypln_pocet_kin == 10) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10;
        } elseif ($predvypln_pocet_kin == 11) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11;
        } elseif ($predvypln_pocet_kin == 12) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11 . $table_test12;
        } elseif ($predvypln_pocet_kin == 13) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11 . $table_test12 . $table_test13;
        } elseif ($predvypln_pocet_kin == 14) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11 . $table_test12 . $table_test13 . $table_test14;
        } elseif ($predvypln_pocet_kin == 15) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11 . $table_test12 . $table_test13 . $table_test14 . $table_test15;
        } elseif ($predvypln_pocet_kin == 16) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11 . $table_test12 . $table_test13 . $table_test14 . $table_test15 . $table_test16;
        } elseif ($predvypln_pocet_kin == 17) {
            $nahrad["{test}"] = $table_test1 . $table_test2 . $table_test3 . $table_test4 . $table_test5 . $table_test6 . $table_test7 . $table_test8 . $table_test9 . $table_test10 . $table_test11 . $table_test12 . $table_test13 . $table_test14 . $table_test15 . $table_test16 . $table_test17;
        } else {
        }

Anonymous,