forked from codeadamca/php-for-while
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile-data-sample.php
More file actions
38 lines (31 loc) · 758 Bytes
/
Copy pathwhile-data-sample.php
File metadata and controls
38 lines (31 loc) · 758 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
<!doctype html>
<html>
<head>
<title>PHP For Loops</title>
</head>
<body>
<h1>PHP For Loops</h1>
<?php
$data = array (
array (
'name' =>'PHP: Hypertext Preprocessor',
'short' => 'PHP'
),
array (
'name' => 'Hyper Text Markup Language',
'short' => 'HTML'
),
array (
'name' => 'Cascading Stylesheets',
'short' => 'CSS'
)
);
$i = 0;
while ($i < count($data))
{
echo '<p>'.$data[$i]['name'].' ('.$data[$i]['short'].')</p>';
$i ++;
}
?>
</body>
</html>