function step($string, $cnf) { $cyk = cyk($string, $cnf); for ($i = 1; $i <= count($string); $i++) { echo "T<sub>" . $i . "1</sub> = " . $string[$i - 1] . " = " . implode(", ", cari($string[$i - 1], $cnf)) . "<br>"; } echo "<br>"; for ($j = 2; $j <= count($string); $j++) { for ($i = 1; $i <= count($string) - $j + 1; $i++) { $tot = array(); for ($k = 1; $k <= $j - 1; $k++) { $gab = array_union($cyk[$k][$i], $cyk[$j - $k][$i + $k]); $gabungan = implode(", ", $gab); $hsl = cariArray(array_union($cyk[$k][$i], $cyk[$j - $k][$i + $k]), $cnf); $tot = array_merge($tot, $hsl); $hasil = implode(", ", $hsl); if ($hasil == "") { $hasil = "∅"; } echo "T<sub>" . $i . $j . "</sub> = T<sub>" . $i . $k . "</sub> - T<sub>" . ($i + $k) . ($j - $k) . "</sub> = " . $gabungan . " = " . $hasil; echo "<br>"; } if ($j > 2) { $total = implode(", ", array_unique($tot)); if ($total == "") { $total = "∅"; } echo "<b>T<sub>" . $i . $j . "</sub> = " . $total . "</b>"; echo "<br>"; } } echo "<br>"; } }
</form> <?php /** * Created by PhpStorm. * User: bryan * Date: 12/9/15 * Time: 6:32 PM */ session_start(); require_once "dbConnect.php"; require_once "func.php"; if (isset($_POST['id_pesanan']) == false) { $_POST['id_pesanan'] = ""; cari($_POST['id_pesanan']); } else { cari($_POST['id_pesanan']); } ?> <form action="" method="post"> <button class="btn waves-effect waves-light deep-orange darken-2" type="submit" name="action">Update Status </button> </form> <?php if (isset($_POST['idmenu']) == false) { echo ""; } else { updStatus($_POST['idmenu']); } ?>