Code: Select all
$f = fopen('$filename', "r");
$c = fgets($f);
$c = fgets($f);
while (!feof($f)) {
$c = fgets($f);
$filename = str_replace("\n", "", fgets($f));
$realname = str_replace("\n", "", fgets($f));
echo "<option value='" . $filename . "'>" . $realname . "\n"; //menu in this case
$g = fopen($filename, "r"); //this has to somehow loop back to the top without forgetting what the last file and the one before that was
}and here is an example file:
Code: Select all
3 //file type identifyer
John Smith //primary perant
1123267570 //file name for this kid
Kid One //kid's name
1123267491 //file name for this kid
Kid Two //kid's name
1123264571 //file name for this kid
Kid Three //kid's name
3 //marker of end of child list
other info
other info
other info