+ 3
Can you found the foule on this code?!!! (php code)... You have 2 min..
<?php $myfile = fopen("names.txt", "w"); $txt "John\n"; fwrite($myfile, $txt); $txt = "David\n"; fwrite($myfile, $txt); fclose($myfile); $read = file('namestxt'); $count = count($read); $i = 1 forech ($read as $line) { echo $line; if($i < $count) echo ', '; } $i+; } > let's start
19 Answers
+ 2
but is not enough
+ 14
$txt "John\n"; // Missing =
+ 12
@ismail Just how many are there?
+ 3
Semicolon after $i=1 ? { to open the if? $i+ missing + ?
+ 3
and ? at the end to close php tag?
+ 3
foreach!
+ 2
$i = 1 is missing a semicolon ; at the end.
+ 2
hmmm but is not the complete answer
+ 2
yeah, as Geoffrey said, it should be ?> at the end.
+ 2
nice but you forgot aother fouls
+ 2
$read = file('names.txt');?
+ 2
or no ?> at the end would be an alternative answer. That's not oblige to close php tags
+ 2
yes you right but another fouls exist on the code
search it ok...and make them on one answer
+ 2
also if($i < count) { (missing bracket)
+ 2
nice work for every one you an intelligent guy's
just you needs another foule for complete the answer
+ 1
= missing before john n after text first line
+ 1
Виталий
+ 1
V
+ 1
V