kev@num Posted March 25, 2010 Share Posted March 25, 2010 hi, i've got a list called $words which I am looping through should ECHO one of these to the browser and for each one of these I want to show a list of filenames which should be made from the second - inner loop. what happens is: the first echo shows and then the inner loop runs but only runs once.. it doesn't run the inner loop for the second echo <?php while (list(, $value) = each($words)) { echo $value ."<br>"; while(false != ($file = readdir($dir))){ if(($file != ".") and ($file != "..")){ echo "<font color='red'>".$file ."</font><br>"; } } } ?> any help would be much appreciated.. do i need to reset the inner loop after each run somehow? Link to comment https://forums.phpfreaks.com/topic/196494-nested-while-only-loops-outer/ Share on other sites More sharing options...
GalaxyTramp Posted March 25, 2010 Share Posted March 25, 2010 if(($file !==".") and ($file !=="..")) GT Link to comment https://forums.phpfreaks.com/topic/196494-nested-while-only-loops-outer/#findComment-1031681 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.