* and then Marek Kilimajer declared
> >Im not very good at regex, is there an function that would help me?
> >(couldnt see one...)
> >
>
> preg_match('/value\s*=\s*"([0-9]+)"/i', $buffer, $result);
> print ("Result:".$result[1]);
Marek, you're a star ;-)
I *hate* having to ask someone to do
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
$handle = fopen("page.php", "r");
while (!feof($handle)) {
$buffer .= fgets($handle, 4096);
}
fclose($handle);
file_get_contents() could be helpful here, too...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Nick,
Nick wrote:
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.
If you have that exact string and you want to extract just the number,
then a simple regex to delete all non-numeric characters should
suffice.
I hav
Nick Wilson wrote:
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:
$handle = fopen("page.php", "r");
while (!feof($handle)) {
4 matches
Mail list logo