-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
44 lines (31 loc) · 749 Bytes
/
index.php
File metadata and controls
44 lines (31 loc) · 749 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<body>
<h1>My first php page</h1>
<input value="edad" type="text" />
<?php
include 'utilities.php';
$color = "red";
$nombre = "Carlos";
$edad = 30;
$precio = 19.99;
$activo = true;
echo "My first PHP script!<br>";
echo "<strong>Hola que tal estamos</strong><br>";
echo "<strong>My car is $color. </strong><br>";
echo "$precio xxxx";
if ($edad > 18) {
echo "<br>Eres mayor de edad.";
} else {
echo "<br>Eres menor de edad.";
}
$frutas = ["Pera", "Manzana", "Kiwi"];
echo "<br><ul>";
foreach ($frutas as $fruta) {
echo "<li>$fruta</li>";
}
echo "</ul>";
echo saludar("Imanol")
?>
</body>
</html>