<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form method="POST" >
<input name="one" type="textbox">
<input name="two" type="textbox">
<button class="clear">Очистить</button>
<button type="submit" class="clear">Проверить</button>
</form>
<?php
$chislo = $_POST["one"];
$poisk = $_POST["two"];
echo substr_count($chislo, $poisk);
?>
<form >
<button type="submit">случайность</button>
</form>
<?php
$mas = array(rand(0,10),rand(0,10),rand(0,10),rand(0,10),rand(0,10));
foreach ($mas as $value) {
echo $value. " ";
}
$max = max($mas);
$min = min($mas);
echo "<br>", $max, "<br>" , $min, "<br>";
$pmax = array_search(max($mas), $mas);
$pmin= array_search(min($mas), $mas);
list($mas[$pmax], $mas[$pmin]) = array($mas[$pmin], $mas[$pmax]);
foreach ($mas as $value) {
echo $value. " ";
}
?>
</body>
</html>
Вроде как можно через isset, но я не знаю как