![]()
![]()
![]()
Ho quest'errore :
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in c:\programmi\apache group\apache\test\perfa.php on line 67
e questo è il codice :
<html>
<?php
$fp = fopen("c:\programmi\apache group\apache\\test\gioc.txt","r");
$arr = file("c:\programmi\apache group\apache\\test\gioc.txt");
fclose($fp);
for($i=0;$i<count($arr);$i++)
$prova[$i] = explode(",",$arr[$i]);
function toglivirg($player)
{
$rest = str_replace("\""," ",$player);
return $rest;
}
?>
<head>
<script type="text/javascript">
<?php
echo "var aa=new Array(";
$tot=count($prova);
for($x=0;$x<$tot;$x++){
echo '"'.toglivirg($prova[$x][1]).'"'.(($x<$tot-1)?',':'');
}
echo ");";
?>
var i=0;
function inserisci(n)
{
if(i<4&&(document.modulo.elements["t"+i].value)=='')
{
document.modulo.elements["t"+i].value=aa[n];
i++;
}
else
alert('Hai gia riempito tutti i campi');
}
function cancella()
{
i=0;
}
</script>
</head>
<body>
<table border=0>
<tr>
<td>
<form name=modulo>
<input type="text" name="t0">
<input type="text" name="t1">
<input type="text" name="t2">
<input type="text" name="t3">
<input type=reset value=reset onClick=cancella()>
</form>
</td>
<td>
<table border=1>
<?php
for ($i=0;$i<count($arr);$i++)
{
if ($prova[$i][0]>=1 and $prova[$i][0]<=99)
echo "<tr> <td>P</td> <td>" . toglivirg($prova[$i][1]) . "</td> </tr>";
else if ($prova[$i][0]>=100 and $prova[$i][0]<=199)
echo "<tr> <td>D</td> <td>" . toglivirg($prova[$i][1]) . "</td> </tr>";
else if ($prova[$i][0]>=200 and $prova[$i][0]<=299)
echo "<tr> <td>C</td> <td>" . toglivirg($prova[$i][1]) . "</td> </tr>";
else if ($prova[$i][0]>=300 and $prova[$i][0]<=399)
echo "<tr> <td>A</td> <td>" . toglivirg($prova[$i][1]) . "</td> </tr>";
}
?>
</table>
</body>
</html>
Please help me!!!!!!!!!!!!!!!

