Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index.html
- ----------
- <form action="deneme.php" method="post">
- <input type="text" name="cal" />
- <button type="submit">Cal</button>
- </form>
- deneme.php
- ------------
- <?php
- $cal = $_POST["cal"];
- function calculation($cal){
- $matrix1 = array();
- for ($row = 0; $row <$cal; $row++) {
- for ($col = 0; $col <$cal; $col++) {
- $matrix1[$row][$col] = rand(10, 99);
- }
- }
- return $matrix1;
- }
- $matrix1 = calculation($cal);
- echo "<pre>";
- var_dump($matrix1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement