PHP Taskbook Level 7.3

Задание 1

You are given a text file. It contains text and numbers. Square each of these numbers and write the result back to the same file.

Задание 2

Given a folder with files. Delete all files with a given extension from this folder.

Задание 3

Given an array. Write the elements of this array to a file so that each element is written on a new line.

Задание 4

Make a function that will return an array filled with N random numbers from a given range such that the numbers do not repeat.

Задание 5

The following data structure is given:

php<?php
  $data = [
    [
      'text' => '111',
      'href' => '1.html',
    ],
    [
      'text' => '222',
      'href' => '2.html',
    ],
    [
      'text' => '333',
      'href' => '3.html',
    ],
  ];
?>

Using this data, create the following layout:

html<a href="1.html">111</a>
<a href="2.html">222</a>
<a href="3.html">222</a>