Manson666
06-06-2003, 21:21
Ho appena iniziato a studiare il php e seguendo una guida ho realizato un semplice script di agenda telefonica statica....il problema è che la tabella e il suo contenuto non si vede, ne sull'editor php quando vado ad interpretare il codice, ne su explorer (usando Apache ovviamente)...la cosa strana è che se metto il codice in FrontPage la tabella appare...perchè?
Il codice è il seguente:
<html>
<head>
<title> Semplice agenda telefonica statica >/title>
</head>
<body>
< ?php
//Un semplice esempio di array multidimensionale: una rubrica telefonica.
$a ["nome"] [0] = "Gianluca";
$a ["cognome"] [0] = "Giusti";
$a ["tel"] [0] = "06/666666";
$a ["nome"] [1] = "Mirko";
$a ["cognome"] [1] = "Simeoni";
$a ["tel"] [1] = "07/777777";
$a ["nome"] [2] = "Fabio";
$a ["cognome"] [2] = "Ferri";
$a ["tel"] [2] = "08/888888";
?>
<table border="1">
<tr bgcolor="gray">
<td>ID</td>
<td>NOME</td>
<td>COGNOME</td>
<td>TELEFONO</td>
</tr>
<tr>
<td>0</td>
<td><?=$a[nome] [0] ?></td>
<td><?=$a[cognome] [0] ?></td>
<td<?=$a[tel] [0] ?></td>
</tr>
<tr>
<td>1</td>
<td><?=$a[nome] [1] ?></td>
<td><?=$a[cognome] [1] ?></td>
<td><?=$a[tel] [1] ?></td>
</tr>
<tr>
<td>1</td>
<td><?=$a[nome] [2] ?></td>
<td><?=$a[cognome] [2] ?></td>
<td><?=$a[tel] [2] ?></td>
</tr>
</table>
</body>
</html>
Il codice è il seguente:
<html>
<head>
<title> Semplice agenda telefonica statica >/title>
</head>
<body>
< ?php
//Un semplice esempio di array multidimensionale: una rubrica telefonica.
$a ["nome"] [0] = "Gianluca";
$a ["cognome"] [0] = "Giusti";
$a ["tel"] [0] = "06/666666";
$a ["nome"] [1] = "Mirko";
$a ["cognome"] [1] = "Simeoni";
$a ["tel"] [1] = "07/777777";
$a ["nome"] [2] = "Fabio";
$a ["cognome"] [2] = "Ferri";
$a ["tel"] [2] = "08/888888";
?>
<table border="1">
<tr bgcolor="gray">
<td>ID</td>
<td>NOME</td>
<td>COGNOME</td>
<td>TELEFONO</td>
</tr>
<tr>
<td>0</td>
<td><?=$a[nome] [0] ?></td>
<td><?=$a[cognome] [0] ?></td>
<td<?=$a[tel] [0] ?></td>
</tr>
<tr>
<td>1</td>
<td><?=$a[nome] [1] ?></td>
<td><?=$a[cognome] [1] ?></td>
<td><?=$a[tel] [1] ?></td>
</tr>
<tr>
<td>1</td>
<td><?=$a[nome] [2] ?></td>
<td><?=$a[cognome] [2] ?></td>
<td><?=$a[tel] [2] ?></td>
</tr>
</table>
</body>
</html>