Bård tommy nilsen wrote:
> I want to read the contents from a html file to a pointer, and seek
> for
> A value, and return it ....
> The text under is an example, and I want to get the 2505 value to be
> returned.
> Eks. $id = '2505'
> (<a onmouseover="window.status='show text';return true;"
> href="javascript:get(2505);">

Try something like this:

$content = @file( '<filename>' );
$pattern = "/a onmouseover=\"window.status='show text';return true;\">

$result = @preg_grep( $pattern, $content );

The $result variable is an array, where the elements are all the matching
lines from the $content array, which is your inputfile. You can then filter
out the value you want using strpos, strrpos and substr.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to