| Index | Value |
|---|---|
| 0 | 386 |
| 1 | 821 |
| 2 | 208 |
| 3 | 355 |
| 4 | 82 |
| 5 | 938 |
| 6 | 678 |
| 7 | 509 |
| 8 | 163 |
| 9 | 968 |
Array
(
[0] => 386
[1] => 821
[2] => 208
[3] => 355
[4] => 82
[5] => 938
[6] => 678
[7] => 509
[8] => 163
[9] => 968
)
<?php
function showArray($arr)
{
echo "<table border=1 cellspacing=0>
<tr><th>Index</th> <th>Value</th></tr>";
foreach ($arr as $key => $value) {
echo "<tr align=center><td>" . $key . "</td><td>" . $value . "</td></tr>";
}
echo "</table>";
}
?>