below is a totally straightworward piece of code...basically it's the same loop (with different vars) for four different files. I have tested it on a windows local installation of php/apache. Every piece of code works fine is run on his own. also combinations of two seem ok most of the time. but when I put the whole thing together (which shold just be more of the same) the script seeems to get lost in a kind of infinite loop, as if the .php file was continuously being accessed by the browser. eventually the browser gives an error (an IE error, not a php error). I am really puzzled and I can't think of an explanation that makes any sense...
wondering if this may have to do with my local installation of php or something...thanks!
<?php
$array_items_aux_V= file ("aux_V.txt");
while (list ($key_one, $frase_aux_V)= each ($array_items_aux_V))
{
$file_one=$key_one." - ".$frase_aux_V."<br><br>";
echo $file_one;
}
echo "<h1>SPACE</h1>";
$array_items_aux_Ving= file ("aux_Ving.txt", "r");
while (list ($key_two, $frase_aux_Ving)= each ($array_items_aux_Ving))
{
$file_two= $key_two." - ".$frase_aux_Ving."<br><br>";
echo $file_two;
}
echo "<h1>SPACE</h1>";
$array_items_mod_V= file ("mod_V.txt");
while (list ($key_three, $frase_mod_V)= each ($array_items_mod_V))
{
$file_three= $key_three." - ".$frase_mod_V."<br><br>";
echo $file_three;
}
echo "<h1>SPACE</h1>";
$array_items_mod_Ving=file ("mod_Ving.txt");
while (list ($key_four, $frase_mod_Ving)= each ($array_items_mod_Ving))
{
$file_four= $key_four." - ".$frase_mod_Ving."<br><br>";
echo $file_four;
}
?>