If you're looking to 'store' the form-data (records) you need a persistent storage mechanism (file/database). However, you can work on your data in a session, see the records that are 'submitted' during a session, stored in a session variable (array).
<?php
session_start();
$arr = []; //initialize empty array
$name2 = $family2 = $email2 = $age2 = "";
?>
<!doctype html>
<html>
<body>
<form name="myform" id="cls-frm" action="" method="post">
<div>
<label for="name">Enter your first name: </label>
<input type="text" name="name" required>
</div>
<div>
<label for="name">Enter your family name: </label>
<input type="text" name="family" required>
</div>
<div>
<label for="name">Enter your email: </label>
<input type="email" name="email" required>
</div>
<div>
<label for="name">Enter your age: </label>
<input type="text" name="age" required>
</div>
<div>
<input type="submit" name="submit" value="submit">
</div>
</form>
<form name="myform2" id="cls-frm2" action="" method="post">
<div>
<label for="name">clear all my records currently in session array</label>
<input type="submit" name="clear" value="clear data">
</div>
</form>
<?php
/* clear the data in session array */
if (isset($_POST['clear'])) {
$_SESSION = [];
}
if (isset($_POST['submit'])) {
$name2 = $_POST["name"];
$family2 = $_POST["family"];
$email2 = $_POST["email"];
$age2 = $_POST["age"];
$arr = ["$name2", "$family2", "$email2", "$age2"];
$_SESSION['arr2demin'][] = $arr; // create a new sub-array for each set of data
echo "<h1>my current session records:</h1> <br>";
echo '<pre>';
print_r($_SESSION['arr2demin']);
echo '</pre>';
echo 'NOTE: if you want to store your session data persistently, you need to save session records to file/database...';
}
// database / file storage code here...
?>
</body>
</html>