Does the array parameter of ereg actually return strings matched?

From: Date: Thu, 10 May 2001 01:13:17 +0000
Subject: Does the array parameter of ereg actually return strings matched?
Groups: php.general 
Request: Send a blank email to php-general+get-52187@lists.php.net to get a copy of this message
Does the array parameter of ereg actually return strings matched? I tried to read a file looking for a string using ereg and wanted to put the matched strings found in an array. Doesn't seem to be happening with the following. $contents=fread($readfile,100000); $pattern="<a href.*\">"; $i=0; while(!feof($readfile)) { $contents=fgets($readfile,4065); if(eregi($pattern,$contents,$regs)) { echo "$regs[$i]<br>"; } $i++; } Thanks Dexter Dexter

« previous php.general (#52187) next »