Matching a variable to something in an array and outputting

From: Date: Wed, 01 Dec 1999 23:51:32 +0000
Subject: Matching a variable to something in an array and outputting
Groups: php.version4 
Request: Send a blank email to php-version4+get-7215@lists.php.net to get a copy of this message
The subject says it all but how do i take a variable like "$file" and run a "scan" in the array "$entry" and then output the result either into another variable or echo it out? Here is my code that i am using right now: (countdisp.php3) <? $countfile = "count.txt if (file_exists($countfile)) { $temparray = file($countfile); for($index = 0; $index < count($temparray); $index++) { $entry = explode("|",$temparray[$index]); echo "$entry[1] <br>"; echo "$entry[0] <br>"; echo "$entry[2] <br>"; } } ?> For example if i access a file like this "countdisp.php3?file=http://www.lagblah.com/file.zip" then i want to display the stats for only that file, how do i do this? Thanks

« previous php.version4 (#7215) next »