My exsternal file
and in my PHP program i use standard function to open and read the file :check: name,required
check: email,required,email-check
check: comment,required
Code: Select all
while (!feof($fd)) {
$line = fgets($fd, 8192);
if (ereg("^check:", $line)) {
$check = explode(",", ereg_replace("check:\ *", "", trim($line)));
$field = $checkї0];
for ($i = 1; $i < count($check); $i++) {
if (ereg("required", $checkї$i])) {
$this->requiredї] = $field;
} else if (ereg("email-check", $checkї$i])) {
$this->checkemailї] = $field;
}
}
}
}Code: Select all
ereg(^check,$line);and in my for statement, which value will $i will compare ?
Code: Select all
for ($i = 1; $i < count($check); $i++)