Help with Strings Please
| From: | Nick Wilson | Date: | Tue, 31 Aug 2004 13:47:01 +0000 |
| Subject: | Help with Strings Please | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-195274@lists.php.net to get a copy of this message | ||
Hi,
I have a string like this, read from an html file: ' VALUE="16">'
The value could be any number. I am trying to get that number.
I have this so far, i was hoping someone might tell me how to get that
number:
<?php
$handle = fopen("page.php", "r");
while (!feof($handle)) {
$buffer .= fgets($handle, 4096);
}
fclose($handle);
$result = stristr($buffer, 'NAME="c"');
print ("Result:<br />".$result);
?>
Im not very good at regex, is there an function that would help me?
(couldnt see one...)
thx...
--
Nick W