What could be wrong when I don't get any results from an array made from whitin a function? function test_print($item, y){ if (ereg("[0-9]", $item)) { $numa[$i] = $item; echo $GLOBALS["i"] . " - $numa[$i]\n"; $GLOBALS["i"]++; } Printing from within this function works fine, but when I want to do the same output outside the function I get nothing. How can I return the array outside the function? This is how I call the script: while (list ($line_num, $line) = each ($fcontents)) { if ($line_num == 7) { $min = explode (" ", $line); array_walk ($min, 'test_print'); reset ($min); } if ($line_num == 8) { $max = explode (" ", $line); array_walk($max, 'test_print'); reset ($max); } if ($line_num > 8) break; set_time_limit(160); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]