> >> for($i = 0; $i < count($users); $i++)
> >> {
> >> for($k = 0; $k < count($grouplines);$k++)
> >> {
> >> $groupline = explode(":", $grouplines[$k]);
> >> if($groupline[0] == $users[$i])
> >> continue 2;
> >> }
> >>
> >> $line = $users[$i] . ":x:" . ($user_ids[$i]+1000) .":\n";
> >> fwrite($h6, $line);
> >> }
> I may be wrong, but doesnt "continue" jump out of the loop? If so, you're jumping
> right over the part of your loop that writes to the file, hence nothing in the file.
I tested this by moving the file writing lines into the conditional just before the "continue 2" line; That way, if there's a match, it writes to the file, *then* skips out of the two loops. It worked just fine.
for($i = 0; $i < count($users); $i++) { for($k = 0; $k < count($grouplines);$k++) { $groupline = explode(":", $grouplines[$k]); if($groupline[0] == $users[$i]) { $line = $users[$i] . ":x:" . ($user_ids[$i]+1000) .":\n"; fwrite($h6, $line); continue 2; } } } -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php