Does anyone know why I get this error when I use this script? The point of this script is to hold 5 rows thats inputted frmo a text field called "textfield". Thanks
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/..../test/submit.php on line 6
<?php
$a = file('data.txt');
if (($c = count($a)) == 5)
unset($a[0]);
$a[$c] = $textfield "\n";
$f = fopen('data.txt', 'w');
foreach ($a as $string)
fwrite($f, $string);
fclose($f);
?>