note 14988 rejected and deleted from control-structures.foreach.php by jmcastagnetto

From: Date: Thu, 23 Aug 2001 21:01:47 +0000
Subject: note 14988 rejected and deleted from control-structures.foreach.php by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-17044@lists.php.net to get a copy of this message
Could someone help me a little. This code should generate one SELECT-list from that logit.txt, but now it generates many of them...? ... if($action=="view") { $logfile = "logit.txt"; $data=file("$logfile"); foreach ($data as $record) { $subdata=explode("|",$record); echo "<FORM ACTION="testi3.php">n"; echo "<SELECT NAME="Joukkueet">n"; for ($index =0 ; $index < count ($subdata[1]); $index++) { echo "<OPTION VALUE="$subdata[1]"> $subdata[1] </OPTION> n"; } echo "</SELECT> n"; echo "</FORM> n"; } } ...

« previous php.notes (#17044) next »