-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
27 lines (23 loc) · 821 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* Simple PHP script to display a random number between 1 to 100 and the square root of that number
*/
$number = rand(1, 100);
$squareRoot = sqrt($number);
?>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Simple PHP script</title>
</head>
<body>
<h3>A simple PHP script to display a random number between 1 to 100 and the square root of that number </h3>
<p>Random number generated - <?php echo $number; ?></p>
<p>Square root of <?php echo $number; ?> is <?php echo $squareRoot; ?></p>
<br>
<p><em>NB: To generate random results, simple refresh the page.</em></p>
</body>
</html>