Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////Задача 1///////////////////////////////////////
- <?php
- for($i = 10; $i >= 7; $i--){
- echo $i;
- }
- ?>
- ////////////////////////Задача 2///////////////////////////////////////
- <?php
- $data = array(7, 3, 2, 1, 4);
- foreach($data as $value){
- echo $value;
- }
- ?>
- ////////////////////////Задача 3///////////////////////////////////////
- <?php
- $data;
- function __construct($data) {
- $this->data = $data;
- }
- ?>
- ////////////////////////Задача 4///////////////////////////////////////
- ^\d{10}$
- ////////////////////////Задача 5///////////////////////////////////////
- <form action="index.php" method="post">
- <label for="name">Name:</label><br>
- <input id="name" type="text" name="name">
- <br><br>
- <label for="password">Password:</label><br>
- <input id="password" type="password" name="password">
- <br><br>
- <label for="age">Age:</label><br>
- <input id="age" type="number" name="age">
- <br><br>
- <input type="submit" value="Submit">
- </form>
- ////////////////////////Задача 6///////////////////////////////////////
- <?php
- $connection = new PDO('mysql:host=localhost;dbname=world', "newuser", "123");
- $rows = $connection->query('SELECT * FROM country');
- ?>
Add Comment
Please, Sign In to add comment