> >What's your actual code? How are you looking for the match in $matches? > >If something was matched, then it'll be there. > > The full cod in the loop is. > > $cnt = 0; > while(!feof($fp)) > { > // Get body > $line_in = fgets($fp,4096); > $cnt++; > // looking for the other end of the marker found above > if (substr($line_in,2,strlen($line_in)-5) != $marker ) > { > $body = $body . $line_in; > $hit[] = preg_match ($ts, $line_in,$matches); > $line[] = $line_in; > $char = substr($line_in,0,1); > $quote[] = preg_match ($qs, $char); > } > if (strpos($line_in, $marker) > 0 ) { > break; > } > } > > Later on in the code after the loop I do > > echo "printing array matches <br>"; > print_r ($matches);echo "<br>";
$matches is going to be over-written after every time through the loop! It doesn't add it all up. Add in a $var[] = $matches; or something inside of your loop to keep track of them all, then print_r($var) to see what it contains. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php