[SOLVED] while ... readdir - problem recreating arrays
Posted: Mon Oct 03, 2005 1:14 pm
Ref: http://mylvn.com/m2w/test.php and http://mylvn.com/m2w-h.php
mylvn.com - ok - [admin@]
vegas215.com - three good users - one bad dup: [admin@]
my-las-vegas-neighborhood.com - one good user [bbs@] - four bad dups
Why do the recreated arrays seem to keep old data (user_ids) and just add new ones to it?
Burrito: Please use
mylvn.com - ok - [admin@]
vegas215.com - three good users - one bad dup: [admin@]
my-las-vegas-neighborhood.com - one good user [bbs@] - four bad dups
Why do the recreated arrays seem to keep old data (user_ids) and just add new ones to it?
Code: Select all
<TABLE VALIGN=TOP BGCOLOR=#e0e0e0><TR VALIGN=TOP>
<?php
$domain = array ( "mylvn.com", "vegas215.com", "my-las-vegas-neighborhood.com" ) ; chdir ("../../mail");
foreach ($domain as $user_mail_dir) {
echo "<TD ALIGN=CENTER> " . $user_mail_dir . " <BR>\n";
echo "<select name='uname' class='SelectText' />";
echo "\n<option selected disabled>========";
$dh = opendir($user_mail_dir);
while (false !== ($filename = readdir($dh))) $files[] = $filename;
closedir($dh); sort($files);
foreach($files as $user_id) {
if ($user_id >= "A")
echo "\n<option value='" . $user_id . "@" . $user_mail_dir . "'>" . $user_id;
}
echo "\n</select>\n</TD>\n";
}
?>
</TR></TABLE>Code: Select all
tags when [url=http://forums.devnetwork.net/viewtopic.php?t=21171]posting php code in the forum[/url].[/size]